mirror of
https://github.com/verilator/verilator.git
synced 2026-10-05 17:43:31 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e2ba6a003 | ||
|
|
3aa6332f25 | ||
|
|
36599133bf | ||
|
|
941f96c913 | ||
|
|
93578d64d2 | ||
|
|
8c705ee145 | ||
|
|
c5c5f11e16 | ||
|
|
fd0446f481 | ||
|
|
2ebed755e6 | ||
|
|
2a7aa28b20 | ||
|
|
fb56f4f880 | ||
|
|
d4e73e215e | ||
|
|
d5c9369103 | ||
|
|
af27702188 | ||
|
|
2c813488f4 | ||
|
|
708abe0dd1 | ||
|
|
22e0f3edbe | ||
|
|
2cdf0aae72 | ||
|
|
ee4a601c9e | ||
|
|
e7b6a7ef6a | ||
|
|
2825940fad | ||
|
|
c6f6dab413 | ||
|
|
bbbee8b89e | ||
|
|
5250408019 | ||
|
|
a198a3c1e1 | ||
|
|
f311a0a5a5 | ||
|
|
ec1c112791 | ||
|
|
7ecc2d4df7 | ||
|
|
512fe0a2d1 | ||
|
|
ec4eb18846 | ||
|
|
f064a94f1d | ||
|
|
19398efc4c | ||
|
|
fcb8bc22bd | ||
|
|
2ee52222e2 | ||
|
|
c11cd18491 | ||
|
|
eebda248c7 | ||
|
|
8d737271ca | ||
|
|
52cde49a6f | ||
|
|
6c9c16c31d | ||
|
|
0c93c3844f | ||
|
|
e5e5bc0fa3 | ||
|
|
d6237e55b2 | ||
|
|
3ec1e9eb07 | ||
|
|
d5bdd07c01 | ||
|
|
5fddf51e8c | ||
|
|
0a28fc8c63 | ||
|
|
9eafca5e28 | ||
|
|
729bd268de | ||
|
|
6c332a2f8e | ||
|
|
a8f83d5758 | ||
|
|
65bfb4e5ff | ||
|
|
c75a686081 | ||
|
|
2705715bb1 | ||
|
|
208f1504fb | ||
|
|
24b5215cf9 | ||
|
|
6016e74b55 | ||
|
|
0c4d88bacc | ||
|
|
01a54d6960 | ||
|
|
23fc08bdf9 | ||
|
|
13ddd0bc1c | ||
|
|
31121141db | ||
|
|
9d3e800311 | ||
|
|
7280307a39 | ||
|
|
c207e98306 | ||
|
|
60d5f0e86b | ||
|
|
18cabc369b | ||
|
|
cd871ca79e | ||
|
|
c67fe02f06 | ||
|
|
2d2bd5b95e | ||
|
|
02835f199b | ||
|
|
e6e7bd8d83 | ||
|
|
b1c7de4ad5 | ||
|
|
f0f68f42d1 | ||
|
|
e3341e9a7c | ||
|
|
1abd339863 | ||
|
|
d22df4e907 | ||
|
|
ac19d552b1 | ||
|
|
58b4ed0995 | ||
|
|
7ef9b32faa | ||
|
|
24b3816f5e | ||
|
|
5555f20bd2 | ||
|
|
809701d7c6 | ||
|
|
6fd48da7cf | ||
|
|
b976b8dac9 | ||
|
|
c238d3da76 | ||
|
|
0edf1f0c94 | ||
|
|
31bb73e3de | ||
|
|
8f2e4f6bb0 | ||
|
|
2158a4573e | ||
|
|
1e89392e76 | ||
|
|
b0c1ac7ea2 | ||
|
|
1f19e8e206 | ||
|
|
258d9adfea | ||
|
|
fa063574d0 | ||
|
|
eea7e1bd2a | ||
|
|
fb561d925a | ||
|
|
9f5eb8f66e | ||
|
|
1f331bd94f | ||
|
|
2143bcfad5 | ||
|
|
e1f9fffb42 | ||
|
|
e4dcbb22e3 | ||
|
|
f4c1a7efeb | ||
|
|
ef9f477df2 | ||
|
|
2dd5ef5e8b | ||
|
|
a43eba7011 | ||
|
|
61c9866a1e | ||
|
|
63782556ae | ||
|
|
8814111724 | ||
|
|
fd35492226 | ||
|
|
a44d2b2570 | ||
|
|
aba3883092 | ||
|
|
9699192de8 | ||
|
|
0f7ec6c9ba | ||
|
|
471f14d26a | ||
|
|
bdc162db87 | ||
|
|
706842d093 | ||
|
|
31779b8b8b | ||
|
|
80d62adec7 | ||
|
|
38cab569ed | ||
|
|
828f78ece4 | ||
|
|
5e95cc9280 | ||
|
|
88fed4bc2f | ||
|
|
3718fe1ca1 | ||
|
|
a4ab3e12f6 | ||
|
|
9c85426e77 | ||
|
|
e3b20a3ea2 | ||
|
|
f7c23c4ade | ||
|
|
00cedf3797 | ||
|
|
1422c23434 | ||
|
|
1a6378291a | ||
|
|
267c6f6dce | ||
|
|
45fbd98ff1 | ||
|
|
f6c0108c86 | ||
|
|
37d68d39c8 | ||
|
|
5e56f4d11b | ||
|
|
2bf248bf60 | ||
|
|
39ce2f77f4 | ||
|
|
9797af0ad4 | ||
|
|
1e4839e5d1 | ||
|
|
b2139f65d8 | ||
|
|
44fd205e12 | ||
|
|
8624ce6a84 | ||
|
|
e68788d914 | ||
|
|
490f9f757d | ||
|
|
5290062549 | ||
|
|
53d9c30277 | ||
|
|
76494891cf | ||
|
|
008b8d5b56 | ||
|
|
d77c9da983 | ||
|
|
422c076fec | ||
|
|
12416bc0a3 | ||
|
|
4351abfe71 | ||
|
|
2022ec43cf | ||
|
|
15f7741eaf | ||
|
|
aedd16225a | ||
|
|
8749f545b6 | ||
|
|
82b878ce42 | ||
|
|
15802dadf1 | ||
|
|
f446295274 | ||
|
|
f450d51de1 | ||
|
|
dd0c2cac9b | ||
|
|
a1cd55225c | ||
|
|
47e7e21706 | ||
|
|
6660627558 | ||
|
|
c443e229ee | ||
|
|
2e9e4ae110 | ||
|
|
56dd58d259 | ||
|
|
53a6830f71 | ||
|
|
f5ad5cf034 | ||
|
|
f579e55706 | ||
|
|
cf7f49e139 | ||
|
|
39d9ecfe51 | ||
|
|
4c2a9aac4c | ||
|
|
70c1eda174 | ||
|
|
ac26d5889f | ||
|
|
8fcf9da1ad | ||
|
|
136468ca78 | ||
|
|
62b528c2e3 | ||
|
|
ee875d0166 | ||
|
|
04ebba8667 | ||
|
|
a9bd112e0c | ||
|
|
adce7ecf4b | ||
|
|
0d6099b2b7 | ||
|
|
23c243bb82 | ||
|
|
e2c11cceb8 | ||
|
|
52fc134272 | ||
|
|
2b2680770b | ||
|
|
6a31b19224 | ||
|
|
8d0f7cdac8 | ||
|
|
7242ceb998 | ||
|
|
cb95a7294f | ||
|
|
efc116323b | ||
|
|
a29ac44af9 | ||
|
|
961a2fef61 | ||
|
|
5658d7238d | ||
|
|
4f36e3e6c9 | ||
|
|
273fcce095 | ||
|
|
0ea5af40c5 | ||
|
|
a9f4129b6b | ||
|
|
c8d8e95d52 | ||
|
|
e9c7f40bb4 | ||
|
|
8c12dcf751 | ||
|
|
c62546c761 | ||
|
|
6d3ec160e1 | ||
|
|
f26a7c2a5d | ||
|
|
2ca21c01d2 | ||
|
|
d6c2e2faf6 | ||
|
|
014bffdf5e | ||
|
|
8992e2ec02 | ||
|
|
f39318bde5 | ||
|
|
e9b5721fb0 | ||
|
|
0b17d4f059 | ||
|
|
64802f6f3d | ||
|
|
9a39c69cb9 | ||
|
|
05db4e41cd | ||
|
|
d4d87ef300 | ||
|
|
5b4448de23 | ||
|
|
e0808bcd15 | ||
|
|
4155de721b | ||
|
|
02d82978e5 | ||
|
|
ca01d6f18d | ||
|
|
ee25114a00 | ||
|
|
87728a9ee3 | ||
|
|
4e41c13501 | ||
|
|
7ea014dab5 | ||
|
|
2e158d88c1 | ||
|
|
a1ab295b74 | ||
|
|
93eabb83b2 | ||
|
|
b6c393e9f0 | ||
|
|
3fd3526d76 | ||
|
|
82710a55a4 | ||
|
|
29505ef013 | ||
|
|
a159c41219 | ||
|
|
07de647cd7 | ||
|
|
334e42b38e | ||
|
|
96f9f8558b | ||
|
|
5da9368032 | ||
|
|
c20bced485 | ||
|
|
dfab80fab1 | ||
|
|
38f6a467e9 | ||
|
|
26c0fa0a6a | ||
|
|
12eb4e85ac | ||
|
|
f79e59b226 | ||
|
|
daf5174134 | ||
|
|
8350c381c2 | ||
|
|
ba1f53a070 | ||
|
|
50866e470a | ||
|
|
e6b19d557e | ||
|
|
4261f72bd2 | ||
|
|
6a189a1f81 | ||
|
|
9dcda6947d | ||
|
|
e3788e871e | ||
|
|
ce79c4ebf9 | ||
|
|
1b4a82acde | ||
|
|
67853e2f29 | ||
|
|
b201b6257b | ||
|
|
d1becbb793 | ||
|
|
abcb9cc91b | ||
|
|
689d5b5090 | ||
|
|
3a55600913 | ||
|
|
404b323f8c | ||
|
|
21e9794fd7 | ||
|
|
1b985da2a1 | ||
|
|
1b18a85e76 | ||
|
|
5022e81af7 | ||
|
|
c99f01b7fe | ||
|
|
b52b063c16 | ||
|
|
2feb46fc5d | ||
|
|
44478a53c2 | ||
|
|
2cde7b0128 | ||
|
|
29ed866061 | ||
|
|
e88dff6929 | ||
|
|
3651321679 | ||
|
|
7469166c38 | ||
|
|
5a4e4b2dcd | ||
|
|
9483ebefae | ||
|
|
1533693654 | ||
|
|
ac171f16fd | ||
|
|
c61d3ee557 | ||
|
|
4592724c1f | ||
|
|
31598e6cb6 | ||
|
|
041d04b052 | ||
|
|
878a75c0f3 | ||
|
|
6ff1911110 | ||
|
|
a9d61a8bff | ||
|
|
8df06a9f08 | ||
|
|
2cad22a22a | ||
|
|
caa9c99837 | ||
|
|
8c3ad591ae | ||
|
|
47dcbd4b8a | ||
|
|
cf9ac8270b | ||
|
|
de774ac4d8 | ||
|
|
81ef8fb201 | ||
|
|
018d994781 | ||
|
|
97b869e5d8 | ||
|
|
ed2f8dc097 | ||
|
|
be31fdcfe4 | ||
|
|
90773f4980 | ||
|
|
92f02c9db7 | ||
|
|
4fa41c5dd8 | ||
|
|
7cc7afca04 | ||
|
|
e81abdb616 | ||
|
|
81417a2889 | ||
|
|
fec5e69ec5 | ||
|
|
05e5fb04ed | ||
|
|
5489bbcc41 | ||
|
|
dfd54a6abf | ||
|
|
17b75c6428 | ||
|
|
ce78d6e438 | ||
|
|
dad86b9a84 | ||
|
|
e1a48dcb07 | ||
|
|
0b501df959 | ||
|
|
57d1404f40 | ||
|
|
2f8fa75691 | ||
|
|
00c3bafe7d | ||
|
|
206bd416aa | ||
|
|
30c34e4975 | ||
|
|
1a5f599626 | ||
|
|
c95e606c0a | ||
|
|
a886f28c85 | ||
|
|
8c2ee6c5ab | ||
|
|
6ada513fa5 | ||
|
|
9f381f7617 | ||
|
|
48986ccdeb | ||
|
|
0f8e494c76 | ||
|
|
9650aefa42 | ||
|
|
3ae75926e4 | ||
|
|
18f3df438e | ||
|
|
99c02419c0 | ||
|
|
bb5384bc50 | ||
|
|
fd6edd90bc | ||
|
|
191f76dd90 | ||
|
|
975c1b39a9 | ||
|
|
62e877ebf0 | ||
|
|
aa99833580 | ||
|
|
120322df3e | ||
|
|
c1b6faff6d | ||
|
|
22e299e78e | ||
|
|
d559190e9e | ||
|
|
c5e5be8e99 | ||
|
|
2b2fe13e79 | ||
|
|
64887bd92d | ||
|
|
95b0e9eef2 | ||
|
|
e44563fddc | ||
|
|
f2a7f30b09 | ||
|
|
43cf5693d1 | ||
|
|
20b3f0efa0 | ||
|
|
2b72218dd8 | ||
|
|
36eb952b60 | ||
|
|
99afffa949 | ||
|
|
ae311200bf | ||
|
|
828fa80afa | ||
|
|
fe0a42eaa8 | ||
|
|
153335ff35 | ||
|
|
7bce15b065 | ||
|
|
2225acd3ec | ||
|
|
af5fc4f1ad | ||
|
|
e77e4e1fe6 | ||
|
|
843ae2955e | ||
|
|
483516ce4e | ||
|
|
05bb24df6c | ||
|
|
31223d4058 | ||
|
|
d891e5ac3a | ||
|
|
3c79e00d24 | ||
|
|
555269f791 | ||
|
|
64941538b7 | ||
|
|
fadc6776ec | ||
|
|
878a252437 | ||
|
|
5cadabeb2d | ||
|
|
2517bfd0af | ||
|
|
1f105edf69 | ||
|
|
b82085fbc6 | ||
|
|
cea8b65f8c | ||
|
|
22260c6b85 | ||
|
|
3c849d7ce0 | ||
|
|
fb2c243fc7 | ||
|
|
3bb8fbe73b | ||
|
|
ab5d4bd51d | ||
|
|
bcf9abf490 | ||
|
|
b7c26dbea9 | ||
|
|
4f1867a4f8 | ||
|
|
bd551a7444 | ||
|
|
d4d9e12b66 | ||
|
|
6060acc73d | ||
|
|
e972668169 | ||
|
|
945496d6d9 | ||
|
|
484b76e5b3 | ||
|
|
801d850724 | ||
|
|
769c0fa318 | ||
|
|
a11700271f | ||
|
|
6d80e8f856 | ||
|
|
f57c72e5db | ||
|
|
7eeb930c72 | ||
|
|
5b280c1911 | ||
|
|
1a073fbf5e | ||
|
|
83d978c2cd | ||
|
|
a17e2375b3 | ||
|
|
c0a6858c42 | ||
|
|
7a18adc716 | ||
|
|
bd602d0e2d | ||
|
|
72b2df30f8 | ||
|
|
d6c5d31dcd | ||
|
|
84c323188e | ||
|
|
cbd1bd5dad | ||
|
|
97255dc835 | ||
|
|
9f8b17230a | ||
|
|
93476a7372 | ||
|
|
b8b9170f9d | ||
|
|
575539996b | ||
|
|
922eab5f93 | ||
|
|
b7a533109d | ||
|
|
941e5c659a | ||
|
|
e37a93bffb | ||
|
|
6e3de7bfd1 | ||
|
|
1124829500 | ||
|
|
4096dee598 | ||
|
|
36f41e08a5 | ||
|
|
28ff71b1bf | ||
|
|
db276946b4 | ||
|
|
beb03be731 | ||
|
|
b93e409f0e | ||
|
|
788de3ad24 | ||
|
|
cb4ddd3213 | ||
|
|
7e94b3a4fa | ||
|
|
ca9bdc6e70 | ||
|
|
37ebc6e634 | ||
|
|
457e926168 | ||
|
|
ec4e408b2b | ||
|
|
a16ebaf79c | ||
|
|
1e34ae31d2 | ||
|
|
43811821d6 | ||
|
|
3797b5bca1 | ||
|
|
7deac509c6 | ||
|
|
c39a8b439a | ||
|
|
d0c4aee7b5 | ||
|
|
a88965a124 | ||
|
|
c18cbca813 | ||
|
|
e4eab56495 | ||
|
|
deb5531e54 | ||
|
|
9bb353c577 | ||
|
|
a816c2b75e | ||
|
|
ff702174d8 | ||
|
|
d5d6598d75 | ||
|
|
0abf18f618 | ||
|
|
6adda241c9 | ||
|
|
ce9293fcb3 | ||
|
|
d6168f654e | ||
|
|
738ee3d4eb | ||
|
|
b75901b3eb | ||
|
|
f98782c061 | ||
|
|
3039735648 | ||
|
|
c00c26c705 | ||
|
|
084ba6711b | ||
|
|
c54360485e | ||
|
|
d9ef4ac435 | ||
|
|
176cc5a196 | ||
|
|
7821da6ad5 | ||
|
|
5ee30e271e | ||
|
|
4ce48788c5 | ||
|
|
3590f7e206 | ||
|
|
882b310897 | ||
|
|
82fc142c1c | ||
|
|
5898c22b3b | ||
|
|
13e88106da | ||
|
|
457d1a66f2 | ||
|
|
b04a1caeac | ||
|
|
53c4c7d540 | ||
|
|
fb689bbb19 | ||
|
|
e2e3cc8463 | ||
|
|
6061744c4d | ||
|
|
8e25d2c61d | ||
|
|
18f8c8a14f | ||
|
|
44765e03a3 | ||
|
|
3f119f5647 | ||
|
|
517fdb7587 | ||
|
|
0ca72f8098 | ||
|
|
28d139149a | ||
|
|
81ce2cbc05 | ||
|
|
d7af6436a2 | ||
|
|
c80ca8d03e | ||
|
|
93304f3b82 | ||
|
|
30546afdab | ||
|
|
82d8fe0c27 | ||
|
|
4db673b2ff | ||
|
|
a5fa468343 | ||
|
|
2df1b72ce2 | ||
|
|
2998890647 | ||
|
|
8e178ca4a9 | ||
|
|
d94a8a28fa | ||
|
|
9a32158b5e | ||
|
|
b15dd3f898 | ||
|
|
af0e535015 | ||
|
|
5b2844e1be | ||
|
|
53ce708294 | ||
|
|
a1322635fd | ||
|
|
ab4ad9965c | ||
|
|
2273fa62d9 | ||
|
|
cca874dc83 | ||
|
|
274475aefd | ||
|
|
a91cf18d09 | ||
|
|
a7723ee9a5 | ||
|
|
28ee80c310 | ||
|
|
26da90ffce | ||
|
|
9eb211a8d4 | ||
|
|
75c2884fea | ||
|
|
f49f86c7ce | ||
|
|
a1989161d8 | ||
|
|
f11fa61ecf | ||
|
|
9a904b97b2 | ||
|
|
7d05be802d | ||
|
|
5e7b0d526d | ||
|
|
ff3d35ca61 | ||
|
|
c23de458ed | ||
|
|
90e0c9bdcd | ||
|
|
7892c5af13 | ||
|
|
0a0e4dce09 | ||
|
|
8e06b1e925 | ||
|
|
a15540dfdd | ||
|
|
3c680ddf22 | ||
|
|
47eeef485d | ||
|
|
251812638d | ||
|
|
cf7ea06b5d | ||
|
|
cd248f6bd7 | ||
|
|
b32d530000 | ||
|
|
570631380b | ||
|
|
d5f88cbf78 | ||
|
|
74ef35d3b3 | ||
|
|
8b8ebb0e43 | ||
|
|
301b4ff1ad | ||
|
|
5476ff93e2 | ||
|
|
375ea169b9 | ||
|
|
9c2785b49b | ||
|
|
8582aed66a | ||
|
|
9bd5cd4ef3 | ||
|
|
f858dd44ac | ||
|
|
e69736124f | ||
|
|
f0e691a1b8 | ||
|
|
5fb834e41e | ||
|
|
7f6d4ac359 | ||
|
|
666d0ab552 | ||
|
|
b9f2400d17 | ||
|
|
85b2c6b6c7 | ||
|
|
73a7595335 | ||
|
|
38c6085f54 | ||
|
|
b350b6a0ff | ||
|
|
80564a8f89 | ||
|
|
016611021d | ||
|
|
fa20614277 | ||
|
|
1e69167191 | ||
|
|
faa5edc068 | ||
|
|
e3c32adad4 | ||
|
|
b054d937cb | ||
|
|
212e8fb14b | ||
|
|
014e43f0ef | ||
|
|
d21b4e3fc7 | ||
|
|
0818d88113 | ||
|
|
77ec2dc875 | ||
|
|
665e8edaff | ||
|
|
67103d346b | ||
|
|
aebb54444e | ||
|
|
a54ac52a35 | ||
|
|
aa360052a8 | ||
|
|
e09f039a36 | ||
|
|
ff262fc4fb | ||
|
|
9a9931fb9d | ||
|
|
30686d8550 | ||
|
|
05f3fd7c6e | ||
|
|
e14319b401 | ||
|
|
1299b70945 | ||
|
|
cf2810db8b | ||
|
|
d77beecc6e | ||
|
|
0c6bd42da3 | ||
|
|
5091298fae | ||
|
|
cef7610b14 | ||
|
|
ed268805ce | ||
|
|
123d1af29d | ||
|
|
cc307626c0 | ||
|
|
963fd0664d | ||
|
|
4643d6e883 | ||
|
|
d89fc05da1 | ||
|
|
84d7380588 | ||
|
|
04febb1944 | ||
|
|
d56b923eaa | ||
|
|
a37866ee92 | ||
|
|
1a92a44c7d | ||
|
|
60a1d25a96 | ||
|
|
ad21f2e850 | ||
|
|
ffbae97a3d | ||
|
|
380137a402 | ||
|
|
ac2058c7ec | ||
|
|
de931d6a97 | ||
|
|
f2d8e45d72 | ||
|
|
085ef5fc05 | ||
|
|
6095efd84e | ||
|
|
114ab1378f | ||
|
|
8622c754b7 | ||
|
|
bf24fa9478 | ||
|
|
e1c45440fc | ||
|
|
b0cb43b2f2 | ||
|
|
dc1f44840d | ||
|
|
fd21a41acd | ||
|
|
cf09a9b6d2 | ||
|
|
dc306cf371 | ||
|
|
35374f09b4 | ||
|
|
e85a2e860e | ||
|
|
103ba1fb6d | ||
|
|
b684995292 | ||
|
|
c371a63d41 | ||
|
|
0102efd4ea | ||
|
|
abfee1270f | ||
|
|
5992d678be | ||
|
|
b6ded59c2b | ||
|
|
c0888c1b0f | ||
|
|
fa77141519 | ||
|
|
b3760911e7 | ||
|
|
b500e57991 | ||
|
|
19e4013ab5 | ||
|
|
82b2af3b83 | ||
|
|
e6f7510895 | ||
|
|
2f718b9ea0 | ||
|
|
899e7bacb2 | ||
|
|
5b3717b369 | ||
|
|
1e7c61b23e | ||
|
|
0e1e380a55 | ||
|
|
1b0a48ea02 | ||
|
|
70b3a599ce | ||
|
|
26c0e6ba00 | ||
|
|
efc6fb7fc3 | ||
|
|
b68038a73f | ||
|
|
f4ef4ad9f3 | ||
|
|
f6f7684ccd | ||
|
|
e74cc32f2d | ||
|
|
c64cc989f0 | ||
|
|
f94fcaa8e4 | ||
|
|
297b297bc7 | ||
|
|
02cb3d17a2 | ||
|
|
c3cfaf55ed | ||
|
|
3e7013af31 | ||
|
|
f7a5883205 | ||
|
|
5d3482734a | ||
|
|
e8c03650ae | ||
|
|
7eac788306 | ||
|
|
6a58e67699 | ||
|
|
b49be06a5a | ||
|
|
87b2adb6a1 | ||
|
|
5634a18f78 | ||
|
|
b84c9bb4c0 | ||
|
|
6dfce882a1 | ||
|
|
79d33bf1ee | ||
|
|
44eb362a18 | ||
|
|
8664aac225 | ||
|
|
6965e138aa | ||
|
|
fc52fb9093 | ||
|
|
cef7708f38 | ||
|
|
438fb01665 | ||
|
|
67d5b1a11a | ||
|
|
d78941885b | ||
|
|
6e7b07c794 | ||
|
|
9655e287ab | ||
|
|
917ca2bad7 | ||
|
|
c3f5dd7414 | ||
|
|
04c7fd1696 | ||
|
|
152689776d | ||
|
|
778f133118 | ||
|
|
ff5465308b | ||
|
|
602750b1ee | ||
|
|
2a24bb4759 | ||
|
|
7c4259bc0a | ||
|
|
1c2384cb3d | ||
|
|
75881754a9 | ||
|
|
0505816d31 | ||
|
|
48bcf66ac7 | ||
|
|
0145d9d514 | ||
|
|
2ce86eddfa | ||
|
|
b663d1a230 | ||
|
|
5821048df7 | ||
|
|
80284c437e | ||
|
|
2aedc91151 | ||
|
|
c1e8337fc1 | ||
|
|
1858cc8ff1 | ||
|
|
5e6aca59ab | ||
|
|
726e78fdda | ||
|
|
085e8454b8 | ||
|
|
85b05366bc | ||
|
|
e6b0479b80 | ||
|
|
3a53b32a32 | ||
|
|
cf7b5c091a | ||
|
|
51b0963e61 | ||
|
|
0c949ceba2 | ||
|
|
5c070558ae | ||
|
|
0c328b6eaf | ||
|
|
f670eccf8c | ||
|
|
23140aeff0 | ||
|
|
d44426b3f3 | ||
|
|
05ff96bea3 | ||
|
|
77ac9bfcc6 | ||
|
|
34b8ed4cf0 | ||
|
|
95d1272269 | ||
|
|
046c0a7aa1 | ||
|
|
835905bdae | ||
|
|
51d1235cda | ||
|
|
2f21b3385a | ||
|
|
9d0a7d5e70 | ||
|
|
4cec3ff2a0 | ||
|
|
25593c0ee2 | ||
|
|
5d3dd52f13 | ||
|
|
ec36d0d772 | ||
|
|
3d2503f9aa | ||
|
|
4576644591 | ||
|
|
d8df216a8d | ||
|
|
964dcd5b7c | ||
|
|
f62c070d06 | ||
|
|
a56e0a6e89 | ||
|
|
451e961e03 | ||
|
|
cb550e5357 | ||
|
|
829db3eefa | ||
|
|
44f938e507 | ||
|
|
4849c0530b | ||
|
|
f4ed367850 | ||
|
|
d4df94d866 | ||
|
|
5d8019f941 | ||
|
|
48597bebaf | ||
|
|
470859f929 | ||
|
|
77553d23fc | ||
|
|
3b9c8b64f7 | ||
|
|
7e5f562500 | ||
|
|
d4d3ae4dfc | ||
|
|
79b1b07fcd | ||
|
|
e3cf5c07e4 | ||
|
|
8750352495 | ||
|
|
3d8dc2774b | ||
|
|
0a9ae154be | ||
|
|
e25a6334cf | ||
|
|
070bead9f9 | ||
|
|
549921be2e | ||
|
|
7c05033b79 | ||
|
|
215d3614c0 | ||
|
|
1ebf937a6c | ||
|
|
7be343fd7c | ||
|
|
fb2d78520f | ||
|
|
c5da072ff6 | ||
|
|
efbcb094ca | ||
|
|
5033c906fd | ||
|
|
f8ab30d127 | ||
|
|
222ca4b009 | ||
|
|
e3a1954e20 | ||
|
|
4ba2637360 | ||
|
|
6430743b6f | ||
|
|
0c49cca527 | ||
|
|
7a9e79ea79 | ||
|
|
157948c552 | ||
|
|
1a127a479c | ||
|
|
87e4a86fbb | ||
|
|
1c1b95161b | ||
|
|
66d1754d19 | ||
|
|
57a53c014d | ||
|
|
e48a859b86 | ||
|
|
430238a6b4 | ||
|
|
9a4c5509fc | ||
|
|
0765443353 | ||
|
|
d07a6f81e4 | ||
|
|
fac04521db | ||
|
|
d0819f156f | ||
|
|
b77eab3f83 | ||
|
|
30f3774134 | ||
|
|
1899a875a4 | ||
|
|
cc134b38ee | ||
|
|
993115d30a | ||
|
|
c1d35c8622 | ||
|
|
16fba59480 | ||
|
|
4266c789ce | ||
|
|
627d83e807 | ||
|
|
80f5738544 | ||
|
|
600641b4a1 | ||
|
|
70eb99b050 | ||
|
|
dc1ad16b03 | ||
|
|
ba5779c69e | ||
|
|
069eb97eca | ||
|
|
96a959154a | ||
|
|
4f88ec3518 | ||
|
|
ef4f91ae5a | ||
|
|
45eccaecaf | ||
|
|
0397e19726 | ||
|
|
687edba969 | ||
|
|
02e83da2fa | ||
|
|
ef04ada12b | ||
|
|
bed3101dfc | ||
|
|
4265f9499d | ||
|
|
6acd5847e7 | ||
|
|
16547077a1 | ||
|
|
3ad3944f2c | ||
|
|
be8f1a25c6 | ||
|
|
f7f3d3fd43 | ||
|
|
4003e01283 | ||
|
|
917d3b0fb3 | ||
|
|
3d073c9534 | ||
|
|
20206b1e2e | ||
|
|
fefe731105 | ||
|
|
1dce6b2500 | ||
|
|
d2fac4aa2f | ||
|
|
132cc1d068 | ||
|
|
f4a72946eb | ||
|
|
e10156548d | ||
|
|
4e6d2cfe38 | ||
|
|
7f3a73e314 | ||
|
|
143050e034 | ||
|
|
8455ee7091 | ||
|
|
9702d11657 | ||
|
|
decbf79f39 | ||
|
|
2d7d2c5992 | ||
|
|
2abbd5c145 | ||
|
|
583605b218 | ||
|
|
67fab0b4fc | ||
|
|
43213fcdc2 | ||
|
|
f632ea500c | ||
|
|
dbb69412e5 | ||
|
|
d7bc0ff5e5 | ||
|
|
14604a24d6 | ||
|
|
816c5e0dc9 | ||
|
|
aa39d020d8 | ||
|
|
b67f1f0e94 | ||
|
|
f5546febe8 | ||
|
|
27181d534e | ||
|
|
698e0fbbd1 | ||
|
|
ea9b65fe6d | ||
|
|
3c1ed075e5 | ||
|
|
6013b54f7b | ||
|
|
d75a8624c1 | ||
|
|
ac04e85a1c | ||
|
|
78aee6f4e7 | ||
|
|
ee9d6dd63f | ||
|
|
034737d2a8 | ||
|
|
72d2cff0a1 | ||
|
|
033e7ac020 | ||
|
|
042d3eed23 | ||
|
|
ea4031cbd3 | ||
|
|
c0127599df | ||
|
|
7c54a451a9 | ||
|
|
2118038cb9 | ||
|
|
9927e8b3ee | ||
|
|
953a442827 | ||
|
|
f3b28c5c74 | ||
|
|
7a33fe2bf2 | ||
|
|
bdecf6c4e1 | ||
|
|
6fcf05e2b6 | ||
|
|
4a5e4b04f3 | ||
|
|
5d98035170 | ||
|
|
20c906261b | ||
|
|
74754d94c3 | ||
|
|
98cd925fda | ||
|
|
e029ba845e | ||
|
|
e53a522662 | ||
|
|
2bc813da4a | ||
|
|
555408b5d3 | ||
|
|
a07f2b3611 | ||
|
|
c85589371a | ||
|
|
1280070abb | ||
|
|
a52f975bd7 | ||
|
|
0c70f0c786 | ||
|
|
edf6a40f19 | ||
|
|
58739a0a99 | ||
|
|
1488f9130d | ||
|
|
a18d8cbe86 | ||
|
|
bfea4b7f99 | ||
|
|
84b8307938 | ||
|
|
ce340658d6 | ||
|
|
a02c420064 | ||
|
|
d55c233427 | ||
|
|
25bbbbd37b | ||
|
|
fdb4d3a145 | ||
|
|
ced1af8cb8 | ||
|
|
f0a6e4c2b2 | ||
|
|
9e5cd463e5 | ||
|
|
bb8899f307 | ||
|
|
1194dbf19c | ||
|
|
0cd4a57ad9 | ||
|
|
1bd1e21a69 | ||
|
|
7e7447812c | ||
|
|
af3ab13012 | ||
|
|
b35b5aacfa | ||
|
|
9c01665078 | ||
|
|
a500140f1d | ||
|
|
dced49a804 | ||
|
|
f8a67b2fe8 | ||
|
|
8cdecd5668 | ||
|
|
75d255a3bf | ||
|
|
0674267333 | ||
|
|
1632160fb1 | ||
|
|
e609328ebb | ||
|
|
8291ef6537 | ||
|
|
30600bf1a3 | ||
|
|
b968f57711 | ||
|
|
ee7b399bf5 | ||
|
|
50c28fa9d3 | ||
|
|
a17f51eac0 | ||
|
|
cc50126ad3 | ||
|
|
9d1a39a5e4 | ||
|
|
82cc1a319f | ||
|
|
2fd23458ce | ||
|
|
271fa5fe3c | ||
|
|
04c96694e6 | ||
|
|
e7bd44561c | ||
|
|
4d5e448664 | ||
|
|
236c2141e3 | ||
|
|
788fe3dc27 | ||
|
|
a2abd361db | ||
|
|
09806d7576 | ||
|
|
a2aa678278 | ||
|
|
0b09636c58 | ||
|
|
af197f2ceb | ||
|
|
748c818ccb | ||
|
|
ad55564905 | ||
|
|
ad2cb45a14 | ||
|
|
277fd9197f | ||
|
|
61ff7039b4 | ||
|
|
7342cf278a | ||
|
|
958654909f | ||
|
|
d9be86d69a | ||
|
|
378d947702 | ||
|
|
98b5417e04 | ||
|
|
0af971292e | ||
|
|
43a2fa080a | ||
|
|
0cdc2e038c | ||
|
|
d4a411db6c | ||
|
|
8d367dc8a3 | ||
|
|
5a4cc333fb | ||
|
|
f13fd4478c | ||
|
|
23e4a0f784 | ||
|
|
aa595d40de | ||
|
|
fa828ac9ba | ||
|
|
b1495f0742 | ||
|
|
8006b5479c | ||
|
|
19c2906a64 | ||
|
|
c367b671b6 | ||
|
|
35226d5e1a | ||
|
|
fac89c5d62 | ||
|
|
f40f0464e2 | ||
|
|
262ed9c03a | ||
|
|
a7edf13d62 | ||
|
|
6e57076726 | ||
|
|
cef56c6fca | ||
|
|
91f30af01f | ||
|
|
3c8953fec2 | ||
|
|
6de78d58fa | ||
|
|
d42f9c095b | ||
|
|
46e10173f8 | ||
|
|
d84c7df38f | ||
|
|
6e2d8df9e5 | ||
|
|
e2b40195b4 | ||
|
|
541f983dba | ||
|
|
5658cd3394 | ||
|
|
3963a50aef | ||
|
|
47f040a5fd | ||
|
|
7b7a2e99e3 | ||
|
|
25397e7612 | ||
|
|
4984d19ae9 | ||
|
|
305448ea86 | ||
|
|
4a1d18f0e9 | ||
|
|
30482f3eea | ||
|
|
b469feb44b | ||
|
|
466fd56d18 | ||
|
|
1aaf3f3424 | ||
|
|
b5e4917405 | ||
|
|
140671300c | ||
|
|
820a4dbbdd | ||
|
|
53d8ccd149 | ||
|
|
418b36ea71 | ||
|
|
05e51d0d18 | ||
|
|
575c565e77 | ||
|
|
01255082a6 | ||
|
|
0098e67e59 | ||
|
|
3798a472b5 | ||
|
|
0e322e2e85 | ||
|
|
5cd5c05c05 | ||
|
|
933e796cc2 | ||
|
|
ae701e014d | ||
|
|
3a0b8c8870 | ||
|
|
dea0e6793f | ||
|
|
4862916f39 | ||
|
|
870ec27b73 | ||
|
|
a21947d887 | ||
|
|
893dee3434 | ||
|
|
f083805ab5 | ||
|
|
7067afde5d | ||
|
|
1eaec2aa8a | ||
|
|
da01810d98 | ||
|
|
4c7d5a1dc0 | ||
|
|
d15e3d93c4 | ||
|
|
aae2bf872c | ||
|
|
04c0fc8aa7 | ||
|
|
1d8955fea5 | ||
|
|
48740a0dba | ||
|
|
4a404bd92e | ||
|
|
ff41701ddc | ||
|
|
2590c9c4a6 | ||
|
|
c5d61da5d2 | ||
|
|
5a622fd9db | ||
|
|
c83b1478e1 | ||
|
|
3243651c63 | ||
|
|
8d61cd9029 | ||
|
|
7fe49de420 | ||
|
|
a433096d5a | ||
|
|
b88e1e6970 | ||
|
|
79f228b04f | ||
|
|
d7cc1e6844 | ||
|
|
42312101b5 | ||
|
|
329f5b712a | ||
|
|
6ddd92c0a1 | ||
|
|
277dee109c | ||
|
|
ef71576825 | ||
|
|
c3271aa891 | ||
|
|
1cf17b5e78 | ||
|
|
2b6353b36e | ||
|
|
8b647f0977 | ||
|
|
4c31c5fab5 | ||
|
|
6ce878cb0d | ||
|
|
a67ba04c37 | ||
|
|
ae448e5ef9 | ||
|
|
a57826b125 | ||
|
|
656c460605 | ||
|
|
95534fa5c5 | ||
|
|
611e8b10c6 | ||
|
|
047852eb08 | ||
|
|
6318a08056 | ||
|
|
b60a92eed3 | ||
|
|
fe306a36b8 | ||
|
|
18870f8b62 | ||
|
|
9712ceedd7 | ||
|
|
2e32387e5c | ||
|
|
b66877c9df | ||
|
|
74a6f94e2b | ||
|
|
35fc8b7259 | ||
|
|
e591afd101 | ||
|
|
a41cdf4cfb | ||
|
|
ef72c42aa7 | ||
|
|
fbc814b54a | ||
|
|
4cfa3f879a | ||
|
|
4a8c7e869f | ||
|
|
a4a1c7a384 | ||
|
|
460315128b | ||
|
|
8ddafb4d9f | ||
|
|
ebda8f866c | ||
|
|
5ee4595aa8 | ||
|
|
5089ac6119 | ||
|
|
3f66f846cd | ||
|
|
279f21bb5b | ||
|
|
773ed97504 | ||
|
|
b6d4899d3f | ||
|
|
9d48ff7745 | ||
|
|
c4aab57c62 | ||
|
|
e8f27be200 | ||
|
|
15f0f967b3 | ||
|
|
cbafff8a71 | ||
|
|
41e362b580 | ||
|
|
622f59ad65 | ||
|
|
c5da38206e | ||
|
|
d737266f64 | ||
|
|
978c35995a | ||
|
|
2af7f2fa18 | ||
|
|
373c9090d3 | ||
|
|
723d407a87 | ||
|
|
dc90e6c3c3 | ||
|
|
68a2ed6776 | ||
|
|
7f32d4dc45 | ||
|
|
7b683fe258 | ||
|
|
72858175a2 | ||
|
|
9d7086067c | ||
|
|
5bb1da88ed | ||
|
|
9969a60b34 | ||
|
|
72402fa91e | ||
|
|
8255f3f9fe | ||
|
|
8957f77793 | ||
|
|
7187b82d1d | ||
|
|
1a92a58720 | ||
|
|
2351f9b9ad | ||
|
|
abc3c216f8 | ||
|
|
f1afa667d7 | ||
|
|
76d0671952 | ||
|
|
424769c32b | ||
|
|
f7249ad23a | ||
|
|
613d76c578 | ||
|
|
50662751fe | ||
|
|
c9e59e767a | ||
|
|
a7432bdea7 | ||
|
|
9ffad7f0db | ||
|
|
3097d5e093 | ||
|
|
cff4b5a5ee | ||
|
|
eda46e3949 | ||
|
|
71651718d4 | ||
|
|
da0cb44954 | ||
|
|
57621a93ad | ||
|
|
6a882f9dc6 | ||
|
|
c18b0eb122 | ||
|
|
3c28a66acf | ||
|
|
5c11de1663 | ||
|
|
72ea6bf414 | ||
|
|
101314a572 | ||
|
|
01f3e81a36 | ||
|
|
3cb3b6c400 | ||
|
|
8f58b58853 | ||
|
|
b66826169d | ||
|
|
d2a7376f14 | ||
|
|
c9e8a1cb4d | ||
|
|
8170f6f03f | ||
|
|
0abf88823f | ||
|
|
accf5a9a17 | ||
|
|
c64c81b7a3 | ||
|
|
7834028842 | ||
|
|
1e0d5eb238 | ||
|
|
b5460bd867 | ||
|
|
53cde90c8f | ||
|
|
d20a4db773 | ||
|
|
0f7677480f | ||
|
|
ba3930777a | ||
|
|
9c054a5774 | ||
|
|
cef0105dfc | ||
|
|
4773a1e77c | ||
|
|
ed4c7038b4 | ||
|
|
c4f31d3bb6 | ||
|
|
dc25e9b949 | ||
|
|
1f52b01b2c | ||
|
|
d5fc0fca41 | ||
|
|
212aa332dd | ||
|
|
17e7da77f0 | ||
|
|
201f0d3f5f | ||
|
|
7d0b3b300a | ||
|
|
0b55e205f7 | ||
|
|
9c0c6439cc | ||
|
|
d33d0301f8 | ||
|
|
6fd7f45cef | ||
|
|
57a937df03 | ||
|
|
ffd461dcf8 | ||
|
|
f77058774e | ||
|
|
1d0a726437 | ||
|
|
29bcbb0417 | ||
|
|
2d11c2cbb3 | ||
|
|
2edbcce032 | ||
|
|
35a53d9adb | ||
|
|
2885c2ce97 | ||
|
|
900c023bb5 | ||
|
|
12b95f6b93 | ||
|
|
85de3048a5 | ||
|
|
c1a9fe07e9 | ||
|
|
1a0da2e4ec | ||
|
|
38d11ecabe | ||
|
|
148762364b | ||
|
|
68d7596adf | ||
|
|
f005b7fd87 | ||
|
|
68ed683681 | ||
|
|
61e41595a2 | ||
|
|
484b574cef | ||
|
|
29695adf70 | ||
|
|
fac43811fd | ||
|
|
15f63d12d5 | ||
|
|
ba7b3fd60f | ||
|
|
897b9ccfe2 | ||
|
|
b97e1aa9fe | ||
|
|
d4a631446b | ||
|
|
a2cc053c6f | ||
|
|
8998ffc4e5 | ||
|
|
ca162716c6 | ||
|
|
629dd16714 | ||
|
|
12b903caf4 | ||
|
|
f9a0cf0cff | ||
|
|
070bcddf5a | ||
|
|
feb1e2bd48 | ||
|
|
6e7ee23644 | ||
|
|
c00cc18d37 | ||
|
|
a7e17a8855 | ||
|
|
60fa1db731 | ||
|
|
ac09ad3ffd | ||
|
|
27953e26b6 | ||
|
|
9375d9f603 | ||
|
|
72bd91c7f1 | ||
|
|
8850ca962e | ||
|
|
7fd590f855 | ||
|
|
5f7ae1fbce | ||
|
|
b56a25e89c | ||
|
|
4f32b093e6 | ||
|
|
6a54fb6f96 | ||
|
|
546ccd56c4 | ||
|
|
ca77a93214 | ||
|
|
ee1b20e1cd | ||
|
|
aa86e0bbc0 | ||
|
|
b6b3482010 | ||
|
|
05aecd2c0b | ||
|
|
6ab3d8f3ed | ||
|
|
0fcc7f2987 | ||
|
|
7d7e67b49b | ||
|
|
a41ea180fa | ||
|
|
98889b3f4e | ||
|
|
83fbfa8c71 | ||
|
|
a57262d6e7 | ||
|
|
fe708f045a | ||
|
|
8afcd67a1f | ||
|
|
16e258eb4c | ||
|
|
d6fbbddac9 | ||
|
|
9dc65df982 | ||
|
|
8f64e4a76f | ||
|
|
6e9008fb5a | ||
|
|
5ded80cf79 | ||
|
|
a6deee2083 | ||
|
|
e1f45dd84a | ||
|
|
9fd4541069 | ||
|
|
849487da23 | ||
|
|
dc64b43152 | ||
|
|
209a585a68 | ||
|
|
aa9cde22c8 | ||
|
|
faf7255e83 | ||
|
|
a6c97cc3bc | ||
|
|
977ceb404d | ||
|
|
b44efe7ef7 | ||
|
|
15ad3f46be | ||
|
|
c6d1a9858a | ||
|
|
77cc335c2d | ||
|
|
a95eb53684 | ||
|
|
910803e6db | ||
|
|
dd967f7769 | ||
|
|
b79ef672e1 | ||
|
|
70549e1a64 | ||
|
|
87e1c36e4a | ||
|
|
9991b19610 | ||
|
|
1381d3dbde | ||
|
|
5e575f5906 | ||
|
|
e2cbcd37d8 | ||
|
|
3b37b5b92d | ||
|
|
10b4678ee6 | ||
|
|
c1665818b9 | ||
|
|
27f4399c31 | ||
|
|
df52e481fb | ||
|
|
f93ae707e0 | ||
|
|
6ed10b7fde | ||
|
|
8208fe8a0e | ||
|
|
ace35b3e81 | ||
|
|
2b58e834ee | ||
|
|
14643643c9 | ||
|
|
7176aee852 | ||
|
|
c96a43b452 | ||
|
|
77915f78db | ||
|
|
c52f3349d1 | ||
|
|
6ab51de96d | ||
|
|
97cbc10925 | ||
|
|
65cd4f6047 | ||
|
|
174fd1bf0e | ||
|
|
b12413e42f | ||
|
|
7709130d93 | ||
|
|
15f7685755 | ||
|
|
83c6e9e821 | ||
|
|
1cacb1deab | ||
|
|
03bc8b7480 | ||
|
|
7d6668a3bd | ||
|
|
def40fab9b | ||
|
|
fceedd9f4d | ||
|
|
4272f2116e | ||
|
|
39d903375b | ||
|
|
9164eb03d5 | ||
|
|
7b789fe02a | ||
|
|
4ae3d3af71 | ||
|
|
6a54922044 | ||
|
|
466535abdc | ||
|
|
efacac2e3d | ||
|
|
74e16d85c5 | ||
|
|
39d7cbf412 | ||
|
|
8f7e463656 | ||
|
|
e6f345e45d | ||
|
|
d4f7f5297a | ||
|
|
9b8aebb00c | ||
|
|
58091edd68 | ||
|
|
18412f9322 | ||
|
|
1883ab29cb | ||
|
|
1a64c7d232 | ||
|
|
f3308d236b | ||
|
|
1b94e3b0e2 | ||
|
|
08b74e5ab9 | ||
|
|
5c966ec510 | ||
|
|
dc5c259069 | ||
|
|
dc27a179e2 | ||
|
|
236e6baa76 | ||
|
|
dba88bae3c | ||
|
|
d4b6e2b2b5 | ||
|
|
1e2d73fc80 | ||
|
|
ea3acc2d3a | ||
|
|
152505e879 | ||
|
|
8e6674066f | ||
|
|
8b2666cd04 | ||
|
|
afa8e4c786 | ||
|
|
ef211fc9e0 | ||
|
|
1a6c2fc55d | ||
|
|
15b40a97d9 | ||
|
|
343db78c03 | ||
|
|
4c1ae4701a | ||
|
|
05f213c266 | ||
|
|
0f617988d4 | ||
|
|
1e0b37f4bc | ||
|
|
991d8b178b | ||
|
|
608d5a87d1 | ||
|
|
914a6edd33 | ||
|
|
0cfa828572 | ||
|
|
4556b6c022 | ||
|
|
cba05480ba | ||
|
|
2abbae8dd0 | ||
|
|
f13bd1aec4 | ||
|
|
b6c21ad21a | ||
|
|
26301a4133 | ||
|
|
383f9832d4 | ||
|
|
50535a1894 | ||
|
|
ff31abe341 | ||
|
|
763f621d4c | ||
|
|
d922cae0a2 | ||
|
|
efaf375887 | ||
|
|
5932eae32a | ||
|
|
a331397954 | ||
|
|
a494ad5ec7 | ||
|
|
b617cd5549 | ||
|
|
e55338f927 | ||
|
|
6eadb8e771 | ||
|
|
f6048cc9c1 | ||
|
|
9fdb026e95 | ||
|
|
bf17bb4648 | ||
|
|
4dc1f40856 | ||
|
|
5302a9d0e6 | ||
|
|
e07e9390f6 | ||
|
|
a13eab55f5 | ||
|
|
b2228afd1a | ||
|
|
d3797ade95 | ||
|
|
19b472cf0b | ||
|
|
38a31ae168 | ||
|
|
27516b565d | ||
|
|
c288a7bfb9 | ||
|
|
b44cd57866 | ||
|
|
b88a7f5152 | ||
|
|
7f9aa057bf | ||
|
|
305b4f3c75 | ||
|
|
6f4a8fe695 | ||
|
|
8aec436b5e | ||
|
|
aef2b7ea3c | ||
|
|
dcde026bac | ||
|
|
926209706f | ||
|
|
bd5d4c61c6 | ||
|
|
19abce5535 | ||
|
|
ab058c85bf | ||
|
|
4361c4b57a | ||
|
|
e6beab4037 | ||
|
|
ebeb645539 | ||
|
|
5c72f01598 | ||
|
|
0cf44a9c4f | ||
|
|
1fe5d5db79 | ||
|
|
a1a2650f1e | ||
|
|
07d00f26aa | ||
|
|
8d3d185e3b | ||
|
|
81a63b0c7d | ||
|
|
510be53521 | ||
|
|
4145a38c47 | ||
|
|
590b1853d0 | ||
|
|
08a51e3e09 | ||
|
|
75ebe7a4be | ||
|
|
1e0e51edd3 | ||
|
|
0ca07e4d58 | ||
|
|
1ce360ed5b | ||
|
|
172583eb03 | ||
|
|
c2b49f0174 | ||
|
|
92d62a6568 | ||
|
|
5d9d1cc09f | ||
|
|
57068b95ef | ||
|
|
5f63b24c50 | ||
|
|
81c659957e | ||
|
|
ee8dd32c04 | ||
|
|
0a755e6ecf | ||
|
|
e6c91f59ab | ||
|
|
9f947bcb5f | ||
|
|
135ccf6595 | ||
|
|
9a2a3f8db7 | ||
|
|
8ccc17f30b | ||
|
|
9392eac6a7 | ||
|
|
95c4b6aaba | ||
|
|
1c1319079b | ||
|
|
328fef8190 | ||
|
|
e2dec043a0 | ||
|
|
bd42e31b2a | ||
|
|
6d73237b27 | ||
|
|
6c6d70a5e5 | ||
|
|
6f49f802b1 | ||
|
|
808c958d42 | ||
|
|
961ac49c5c | ||
|
|
2d52f525c5 | ||
|
|
e70cba77e6 | ||
|
|
8054fc47ea | ||
|
|
e673875b3b | ||
|
|
29923b78fd | ||
|
|
135cbcd79a | ||
|
|
75ecad591a | ||
|
|
c108f5def9 | ||
|
|
dab1cb610a | ||
|
|
fd656f6cc1 | ||
|
|
a7e65379fa | ||
|
|
905067d13f | ||
|
|
30a33a6104 | ||
|
|
0ca0e07354 | ||
|
|
aac02acf92 | ||
|
|
082c9e0b1d | ||
|
|
a7bd934fe3 | ||
|
|
e98a380b44 | ||
|
|
4878fe3a1f | ||
|
|
c6b755a12e | ||
|
|
991d81cd0a | ||
|
|
c06a97a221 | ||
|
|
6131bcdbb0 | ||
|
|
68b6a0b667 | ||
|
|
4c438bbc67 | ||
|
|
5b83484f20 | ||
|
|
93ac79981b | ||
|
|
c9b74847d1 | ||
|
|
23eb96579c | ||
|
|
8319ea6c73 | ||
|
|
60f82961b4 | ||
|
|
f7d1c6ca72 | ||
|
|
4b4f10f5e6 | ||
|
|
120f62fe85 | ||
|
|
db6ecbd57e | ||
|
|
28e19cef90 | ||
|
|
18f8cd0529 | ||
|
|
02786b3f09 | ||
|
|
70358e8587 | ||
|
|
95b66feeb8 | ||
|
|
890cecc15b | ||
|
|
f7bad37e88 | ||
|
|
134b5efd70 | ||
|
|
0d6ebf21b3 | ||
|
|
2d1b804e80 | ||
|
|
77f1b3eef4 | ||
|
|
609a5dc26d | ||
|
|
0aabe6ce00 | ||
|
|
20cc4e57d5 | ||
|
|
f3ebdc40c6 | ||
|
|
2ca9f73b31 | ||
|
|
73f5e3f808 | ||
|
|
8d3dad510f | ||
|
|
2576c136f6 | ||
|
|
a8ad97eef2 | ||
|
|
ee7da1e690 | ||
|
|
969a46faf6 | ||
|
|
820df28ad9 | ||
|
|
50fb7fc8b4 | ||
|
|
119162912a | ||
|
|
80d94891e1 | ||
|
|
f00ff61559 | ||
|
|
2d195ebae5 | ||
|
|
9a6bc3ddcf | ||
|
|
d218f1746c | ||
|
|
8d8eb1b9f3 | ||
|
|
d4614c290e | ||
|
|
027cce35c0 | ||
|
|
9fd81b2c6b | ||
|
|
5430e4ac9b | ||
|
|
619214b48f | ||
|
|
68fa82fb14 | ||
|
|
cac50282eb | ||
|
|
b50ef9ff39 | ||
|
|
8a8f1135b7 | ||
|
|
f0b2336345 | ||
|
|
52907e7b02 | ||
|
|
ef5250f0ca | ||
|
|
eafed88a6e | ||
|
|
d64e6b3f9c | ||
|
|
d68ffba8cd | ||
|
|
f0f370490f | ||
|
|
708fd36563 | ||
|
|
a4e8d39932 | ||
|
|
8f0e8e0696 | ||
|
|
11380bc3b2 | ||
|
|
7ab2bdb6bb | ||
|
|
5d037c3c8c | ||
|
|
c5d04631d1 | ||
|
|
957c1d606b | ||
|
|
48dd358c03 | ||
|
|
220daa5f33 | ||
|
|
d76b5b7823 | ||
|
|
4266d31443 | ||
|
|
fbdf5f2dad | ||
|
|
8e26bdd098 | ||
|
|
22088c907f | ||
|
|
d87648c258 | ||
|
|
abf3850d08 | ||
|
|
4a122fd0f2 | ||
|
|
0352ceea44 | ||
|
|
e8ff191a17 | ||
|
|
5ae09daf5b | ||
|
|
1acff950d0 | ||
|
|
f28d837930 | ||
|
|
1dd9a74b6c | ||
|
|
165833a97c | ||
|
|
18e837336a | ||
|
|
835f668aaa | ||
|
|
09199f79a6 | ||
|
|
2f4954ca68 | ||
|
|
7024ea8cb6 | ||
|
|
623c4ec103 | ||
|
|
023526ad4b | ||
|
|
e2ba1c041f | ||
|
|
b41b9417b9 | ||
|
|
4443ab34fd | ||
|
|
e9a309ea8d | ||
|
|
81e8127168 | ||
|
|
47803c3591 | ||
|
|
af38e8d387 | ||
|
|
67bb0c78c8 | ||
|
|
918df2e618 | ||
|
|
7bed17b14b | ||
|
|
fad465abf1 | ||
|
|
98fb7ec193 | ||
|
|
b71eb76252 | ||
|
|
1d2a7b2f41 | ||
|
|
cd38e88fb8 | ||
|
|
a15aa0b82b | ||
|
|
fe94f9891b | ||
|
|
fe9cf9bd42 | ||
|
|
0c99bee4b1 | ||
|
|
f66dacd185 | ||
|
|
5f9ceb99a7 | ||
|
|
2638f9db19 | ||
|
|
8859cbf5bc | ||
|
|
16bb97687a | ||
|
|
1234c83953 | ||
|
|
2982336ec2 | ||
|
|
ca211c3b11 | ||
|
|
87d126de49 | ||
|
|
4a307742c4 | ||
|
|
a2911ed933 | ||
|
|
2a50fafef2 | ||
|
|
029ff69d30 | ||
|
|
aac02c1ed1 | ||
|
|
525c79bd0a | ||
|
|
b5c151863a | ||
|
|
06247686c5 | ||
|
|
951a7d867a | ||
|
|
9978cbfa5c | ||
|
|
f23fe8fd84 | ||
|
|
37dc33a195 | ||
|
|
924fe235a9 | ||
|
|
1957b1ebbd | ||
|
|
b70d1c1349 | ||
|
|
b7665a88db | ||
|
|
19c8d32263 | ||
|
|
7b384f7eb7 | ||
|
|
7bbce51f7b | ||
|
|
ac1cdf7cdf | ||
|
|
c753904a3f | ||
|
|
8bd43d83b1 | ||
|
|
ea5b01d9f3 | ||
|
|
f540dead79 | ||
|
|
40a847d613 | ||
|
|
37b9f254a2 | ||
|
|
c8daab3b46 | ||
|
|
a0d391d695 | ||
|
|
5089f997cc | ||
|
|
5c59fde92e | ||
|
|
81ee4930fc | ||
|
|
350de3719e | ||
|
|
a37a127ef1 | ||
|
|
dc8a0dfd5a | ||
|
|
0ca197ec1b | ||
|
|
f23a7bfdd7 | ||
|
|
9b998cf6b3 | ||
|
|
0f0c3d4684 | ||
|
|
bacbb4cafd | ||
|
|
4afde8b478 | ||
|
|
2cbfe99ad5 | ||
|
|
c1fb938a61 | ||
|
|
49db4d2b66 | ||
|
|
b087673254 | ||
|
|
5c361efaea | ||
|
|
ea979c8f83 | ||
|
|
3a70bbc70c | ||
|
|
3f0e2f7d9d | ||
|
|
c9ca390926 | ||
|
|
4a31b69f84 | ||
|
|
ee184f3f39 | ||
|
|
9807025618 | ||
|
|
9a54b2144b | ||
|
|
0465b6a3b1 | ||
|
|
cafb148a62 | ||
|
|
d738501c01 | ||
|
|
53c6b7df63 | ||
|
|
f514049c04 | ||
|
|
83a1bd0675 | ||
|
|
8cdc0c4e00 | ||
|
|
460e0541f3 | ||
|
|
2408de16a0 | ||
|
|
2a1c57ada6 | ||
|
|
7387db506d | ||
|
|
3ac6745658 | ||
|
|
39950d16d0 | ||
|
|
c62c152048 | ||
|
|
6046b06b17 | ||
|
|
f7a06cb54a | ||
|
|
521418d832 | ||
|
|
1c643916a3 | ||
|
|
9cf5acc43e | ||
|
|
c2037ddbc5 | ||
|
|
ca1b083d5c | ||
|
|
c896a76fef | ||
|
|
bd0eadb311 | ||
|
|
62b0d15d2e | ||
|
|
700f2072c0 | ||
|
|
cda5c53cf9 | ||
|
|
3be0eea995 |
+4
-8
@@ -13,14 +13,14 @@ AllowShortBlocksOnASingleLine: true
|
|||||||
AllowShortCaseLabelsOnASingleLine: true
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
AllowShortFunctionsOnASingleLine: All
|
AllowShortFunctionsOnASingleLine: All
|
||||||
AllowShortIfStatementsOnASingleLine: true
|
AllowShortIfStatementsOnASingleLine: true
|
||||||
AllowShortLoopsOnASingleLine: false
|
AllowShortLoopsOnASingleLine: true
|
||||||
AlwaysBreakAfterDefinitionReturnType: None
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
AlwaysBreakAfterReturnType: None
|
AlwaysBreakAfterReturnType: None
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
AlwaysBreakTemplateDeclarations: false
|
AlwaysBreakTemplateDeclarations: false
|
||||||
BinPackArguments: true
|
BinPackArguments: true
|
||||||
BinPackParameters: true
|
BinPackParameters: true
|
||||||
BraceWrapping:
|
BraceWrapping:
|
||||||
AfterClass: false
|
AfterClass: false
|
||||||
AfterControlStatement: false
|
AfterControlStatement: false
|
||||||
AfterEnum: false
|
AfterEnum: false
|
||||||
@@ -55,12 +55,12 @@ DerivePointerAlignment: false
|
|||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
FixNamespaceComments: true
|
FixNamespaceComments: true
|
||||||
ForEachMacros:
|
ForEachMacros:
|
||||||
- foreach
|
- foreach
|
||||||
- Q_FOREACH
|
- Q_FOREACH
|
||||||
- BOOST_FOREACH
|
- BOOST_FOREACH
|
||||||
IncludeBlocks: Preserve
|
IncludeBlocks: Preserve
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
|
||||||
Priority: 2
|
Priority: 2
|
||||||
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
|
||||||
@@ -90,10 +90,6 @@ PenaltyBreakString: 1000
|
|||||||
PenaltyExcessCharacter: 1000000
|
PenaltyExcessCharacter: 1000000
|
||||||
PenaltyReturnTypeOnItsOwnLine: 60
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
PointerAlignment: Left
|
PointerAlignment: Left
|
||||||
RawStringFormats:
|
|
||||||
- Delimiter: pb
|
|
||||||
Language: TextProto
|
|
||||||
BasedOnStyle: google
|
|
||||||
ReflowComments: true
|
ReflowComments: true
|
||||||
SortIncludes: false
|
SortIncludes: false
|
||||||
SortUsingDeclarations: true
|
SortUsingDeclarations: true
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,*,-modernize*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-default-arguments,-fuchsia-overloaded-operator,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance'
|
Checks: '*,-hicpp*,-android-cloexec-fopen,-cert-dcl50-cpp,-cert-env33-c,-cert-err34-c,-cert-err58-cpp,-clang-analyzer-core.UndefinedBinaryOperatorResult,-clang-analyzer-security*,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-no-malloc,-cppcoreguidelines-owning-memory,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-cppcoreguidelines-pro-type-const-cast,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-static-cast-downcast,-cppcoreguidelines-pro-type-union-access,-cppcoreguidelines-pro-type-vararg,-cppcoreguidelines-special-member-functions,-fuchsia-*,-google-default-arguments,-google-readability-todo,-google-runtime-references,-llvm-header-guard,-llvm-include-order,-misc-string-integer-assignment,-misc-string-literal-with-embedded-nul,-modernize-use-auto,-modernize-use-trailing-return-type,-readability-braces-around-statements,-readability-container-size-empty,-readability-delete-null-pointer,-readability-else-after-return,-readability-implicit-bool-conversion,-readability-named-parameter,-readability-static-accessed-through-instance'
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: ''
|
HeaderFilterRegex: ''
|
||||||
FormatStyle: none
|
FormatStyle: none
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
---
|
---
|
||||||
exclude_paths:
|
exclude_paths:
|
||||||
|
- '.github/**'
|
||||||
- 'ci/build_verilator.sh'
|
- 'ci/build_verilator.sh'
|
||||||
- 'include/vltstd/**'
|
- 'include/vltstd/**'
|
||||||
|
- 'nodist/fastcov.py'
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
*.v linguist-language=SystemVerilog
|
*.v linguist-language=SystemVerilog
|
||||||
*.vh linguist-language=SystemVerilog
|
*.vh linguist-language=SystemVerilog
|
||||||
*.sv linguist-language=SystemVerilog
|
*.sv linguist-language=SystemVerilog
|
||||||
|
Changes linguist-language=reStructuredText
|
||||||
nodist linguist-detectable=false
|
nodist linguist-detectable=false
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: 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, ideally in test_regress format.)
|
||||||
|
|
||||||
|
What 'verilator --version' are you using? Did you try it with the git master version?
|
||||||
|
|
||||||
|
Would you be willing to try to fix Verilator yourself with assistance?
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: 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?
|
||||||
|
|
||||||
|
Can you attach an example that runs on other simulators? (Must be openly licensed, ideally in test_regress format.)
|
||||||
|
|
||||||
|
May we assist you in trying to fix this yourself?
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
name: Q and A, or Other
|
||||||
|
about: Ask a question, not related to a specific bug or feature request. (Note our contributor agreement at https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst)
|
||||||
|
title: ''
|
||||||
|
labels: new
|
||||||
|
assignees: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
How may we help - what is your question?
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
We appreciate your contributing to Verilator. If this is your first commit, please add your name to docs/CONTRIBUTORS, and read our contributing guidelines in docs/CONTRIBUTING.rst.
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
["area: assertions"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: assertions"
|
||||||
|
description = "Issue involves assertions"
|
||||||
|
|
||||||
|
["area: configure/compiling"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: configure/compiling"
|
||||||
|
description = "Issue involves configuring or compilating Verilator itself"
|
||||||
|
|
||||||
|
["area: coverage"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: coverage"
|
||||||
|
description = "Issue involves coverage generation"
|
||||||
|
|
||||||
|
["area: data-types"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: data-types"
|
||||||
|
description = "Issue involves data-types"
|
||||||
|
|
||||||
|
["area: documentation"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: documentation"
|
||||||
|
description = "Issue involves documentation"
|
||||||
|
|
||||||
|
["area: elaboration"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: elaboration"
|
||||||
|
description = "Issue involves elaboration phase"
|
||||||
|
|
||||||
|
["area: invoking/options"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: invoking/options"
|
||||||
|
description = "Issue involves options passed to Verilator"
|
||||||
|
|
||||||
|
["area: lint"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: lint"
|
||||||
|
description = "Issue involves SystemVerilog lint checking"
|
||||||
|
|
||||||
|
["area: parser"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: parser"
|
||||||
|
description = "Issue involves SystemVerilog parsing"
|
||||||
|
|
||||||
|
["area: performance"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: performance"
|
||||||
|
description = "Issue involves performance issues"
|
||||||
|
|
||||||
|
["area: portability"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: portability"
|
||||||
|
description = "Issue involves operating system/compiler portability"
|
||||||
|
|
||||||
|
["area: runtime result"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: runtime result"
|
||||||
|
description = "Issue involves an incorrect runtine result from Verilated model"
|
||||||
|
|
||||||
|
["area: scheduling"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: scheduling"
|
||||||
|
description = "Issue involves scheduling/ordering of events"
|
||||||
|
|
||||||
|
["area: tests"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: tests"
|
||||||
|
description = "Issue involves the testing system"
|
||||||
|
|
||||||
|
["area: usability"]
|
||||||
|
color = "ffffe8"
|
||||||
|
name = "area: usability"
|
||||||
|
description = "Issue involves general usability"
|
||||||
|
|
||||||
|
["effort: days"]
|
||||||
|
color = "d0c0b0"
|
||||||
|
name = "effort: days"
|
||||||
|
description = "Expect this issue to require roughly days of invested effort to resolve"
|
||||||
|
|
||||||
|
["effort: hours"]
|
||||||
|
color = "f5e6d6"
|
||||||
|
name = "effort: hours"
|
||||||
|
description = "Expect this issue to require roughly hours of invested effort to resolve"
|
||||||
|
|
||||||
|
["effort: minutes"]
|
||||||
|
color = "f5e6d6"
|
||||||
|
name = "effort: minutes"
|
||||||
|
description = "Expect this issue to require less than an hour of invested effort to resolve"
|
||||||
|
|
||||||
|
["effort: weeks"]
|
||||||
|
color = "d0c0b0"
|
||||||
|
name = "effort: weeks"
|
||||||
|
description = "Expect this issue to require weeks or more of invested effort to resolve"
|
||||||
|
|
||||||
|
["good first issue"]
|
||||||
|
color = "7057ff"
|
||||||
|
name = "good first issue"
|
||||||
|
description = "Good for newcomers"
|
||||||
|
|
||||||
|
["help wanted"]
|
||||||
|
color = "008672"
|
||||||
|
name = "help wanted"
|
||||||
|
description = "Extra attention is needed"
|
||||||
|
|
||||||
|
["new"]
|
||||||
|
color = "ff4400"
|
||||||
|
name = "new"
|
||||||
|
description = "New issue, not yet seen by maintainers"
|
||||||
|
|
||||||
|
["resolution: abandoned"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: abandoned"
|
||||||
|
description = "Closed; not enough information or otherwise never finished"
|
||||||
|
|
||||||
|
["resolution: answered"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: answered"
|
||||||
|
description = "Closed; only applies to questions which were answered"
|
||||||
|
|
||||||
|
["resolution: duplicate"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: duplicate"
|
||||||
|
description = "Closed; issue or pull request already exists"
|
||||||
|
|
||||||
|
["resolution: external"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: external"
|
||||||
|
description = "Closed; passed to another tool's bug tracker"
|
||||||
|
|
||||||
|
["resolution: fixed"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: fixed"
|
||||||
|
description = "Closed; fixed"
|
||||||
|
|
||||||
|
["resolution: invalid"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: invalid"
|
||||||
|
description = "Closed; issue or pull request is no longer relevant"
|
||||||
|
|
||||||
|
["resolution: no fix needed"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: no fix needed"
|
||||||
|
description = "Closed; no fix required (not a bug)"
|
||||||
|
|
||||||
|
["resolution: wontfix"]
|
||||||
|
color = "cfd3d7"
|
||||||
|
name = "resolution: wontfix"
|
||||||
|
description = "Closed; work won't continue on an issue or pull request"
|
||||||
|
|
||||||
|
["status: asked reporter"]
|
||||||
|
color = "ffffff"
|
||||||
|
name = "status: asked reporter"
|
||||||
|
description = "Bug is waiting for reporter to answer a question"
|
||||||
|
|
||||||
|
["status: assigned"]
|
||||||
|
color = "a0f0ff"
|
||||||
|
name = "status: assigned"
|
||||||
|
description = "Issue is assigned to someone to work on"
|
||||||
|
|
||||||
|
["status: blocked"]
|
||||||
|
color = "00007f"
|
||||||
|
name = "status: blocked"
|
||||||
|
description = "Issue is waiting for another bug, when other bug is fixed, then goes to 'status: assigned'"
|
||||||
|
|
||||||
|
["status: discussion"]
|
||||||
|
color = "d876e3"
|
||||||
|
name = "status: discussion"
|
||||||
|
description = "Issue is waiting for discussions to resolve"
|
||||||
|
|
||||||
|
["status: ready"]
|
||||||
|
color = "b6c92a"
|
||||||
|
name = "status: ready"
|
||||||
|
description = "Issue is ready for someone to fix; then goes to 'status: assigned'"
|
||||||
|
|
||||||
|
["type: bug"]
|
||||||
|
color = "d73a4a"
|
||||||
|
name = "type: bug"
|
||||||
|
description = "Defect"
|
||||||
|
|
||||||
|
["type: feature-IEEE"]
|
||||||
|
color = "cfccff"
|
||||||
|
name = "type: feature-IEEE"
|
||||||
|
description = "Request to add new feature, described in IEEE 1800"
|
||||||
|
|
||||||
|
["type: feature-non-IEEE"]
|
||||||
|
color = "cfccff"
|
||||||
|
name = "type: feature-non-IEEE"
|
||||||
|
description = "Request to add new feature, outside IEEE 1800"
|
||||||
|
|
||||||
|
["type: maintenance"]
|
||||||
|
color = "cfccff"
|
||||||
|
name = "type: maintenance"
|
||||||
|
description = "Internal maintenance task"
|
||||||
|
|
||||||
|
["type: q and a"]
|
||||||
|
color = "84ba34"
|
||||||
|
name = "type: q and a"
|
||||||
|
description = "Question and answer about some feature or user question"
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
# 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: build
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: linux
|
||||||
|
CI_COMMIT: ${{ github.sha }}
|
||||||
|
CCACHE_COMPRESS: 1
|
||||||
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
||||||
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: repo
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
|
||||||
|
compiler:
|
||||||
|
- { cc: clang, cxx: clang++ }
|
||||||
|
- { cc: gcc, cxx: g++ }
|
||||||
|
m32: [0, 1]
|
||||||
|
exclude:
|
||||||
|
# Build pull requests only with ubuntu-20.04 and without m32
|
||||||
|
- os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }}
|
||||||
|
- os: ${{ github.event_name == 'pull_request' && 'ubuntu-16.04' || 'do-not-exclude' }}
|
||||||
|
- m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }}
|
||||||
|
# Build -m32 only on ubuntu-20.04
|
||||||
|
- {os: ubuntu-18.04, m32: 1}
|
||||||
|
- {os: ubuntu-16.04, m32: 1}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: Build | ${{ matrix.os }} | ${{ matrix.compiler.cc }} ${{ matrix.m32 && '| -m32' || '' }}
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
CI_RUNS_ON: ${{ matrix.os }}
|
||||||
|
CI_M32: ${{ matrix.m32 }}
|
||||||
|
CC: ${{ matrix.compiler.cc }}
|
||||||
|
CXX: ${{ matrix.compiler.cxx }}
|
||||||
|
CACHE_BASE_KEY: build-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }}
|
||||||
|
CCACHE_MAXSIZE: 250M # Per build matrix entry (2000M in total)
|
||||||
|
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: repo
|
||||||
|
|
||||||
|
- name: Cache $CCACHE_DIR
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||||
|
with:
|
||||||
|
path: ${{ env.CCACHE_DIR }}
|
||||||
|
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.CACHE_KEY }}-
|
||||||
|
|
||||||
|
- name: Install packages for build
|
||||||
|
run: ./ci/ci-install.bash
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./ci/ci-script.bash
|
||||||
|
|
||||||
|
- 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@v2
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04]
|
||||||
|
compiler:
|
||||||
|
- { cc: clang, cxx: clang++ }
|
||||||
|
- { cc: gcc, cxx: g++ }
|
||||||
|
m32: [0, 1]
|
||||||
|
suite: [dist-vlt-0, dist-vlt-1, dist-vlt-2, vltmt-0, vltmt-1]
|
||||||
|
exclude:
|
||||||
|
# Build pull requests only with ubuntu-20.04 and without m32
|
||||||
|
- os: ${{ github.event_name == 'pull_request' && 'ubuntu-18.04' || 'do-not-exclude' }}
|
||||||
|
- os: ${{ github.event_name == 'pull_request' && 'ubuntu-16.04' || 'do-not-exclude' }}
|
||||||
|
- m32: ${{ github.event_name == 'pull_request' && 1 || 'do-not-exclude' }}
|
||||||
|
# Build -m32 only on ubuntu-20.04
|
||||||
|
- {os: ubuntu-18.04, m32: 1}
|
||||||
|
- {os: ubuntu-16.04, m32: 1}
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
name: Test | ${{ matrix.os }} | ${{ matrix.compiler.cc }} | ${{ matrix.suite }} ${{ matrix.m32 && '| -m32' || '' }}
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
CI_RUNS_ON: ${{ matrix.os }}
|
||||||
|
CI_M32: ${{ matrix.m32 }}
|
||||||
|
CC: ${{ matrix.compiler.cc }}
|
||||||
|
CXX: ${{ matrix.compiler.cxx }}
|
||||||
|
CACHE_BASE_KEY: test-${{ matrix.os }}-${{ matrix.compiler.cc }}-m32=${{ matrix.m32 }}-${ matrix.suite }}
|
||||||
|
CCACHE_MAXSIZE: 64M # Per build matrix entry (2160M in total)
|
||||||
|
VERILATOR_ARCHIVE: verilator-${{ github.sha }}-${{ matrix.os }}-${{ matrix.compiler.cc }}${{ matrix.m32 && '-m32' || '' }}.tar.gz
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Download tar archive
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
path: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Unpack tar archive
|
||||||
|
working-directory: ${{ github.workspace }}
|
||||||
|
run: tar -x -z -f ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
|
- name: Cache $CCACHE_DIR
|
||||||
|
uses: actions/cache@v2
|
||||||
|
env:
|
||||||
|
CACHE_KEY: ${{ env.CACHE_BASE_KEY }}-ccache
|
||||||
|
with:
|
||||||
|
path: ${{ env.CCACHE_DIR }}
|
||||||
|
key: ${{ env.CACHE_KEY }}-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ env.CACHE_KEY }}-
|
||||||
|
|
||||||
|
- name: Install test dependencies
|
||||||
|
run: ./ci/ci-install.bash
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
env:
|
||||||
|
TESTS: ${{ matrix.suite }}
|
||||||
|
run: ./ci/ci-script.bash
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: Contributor Agreement
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Test:
|
||||||
|
name: "'docs/CONTRIBUTORS' was signed"
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: test_regress/t/t_dist_contributors.pl
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: coverage
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * 0' # weekly
|
||||||
|
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: linux
|
||||||
|
CI_COMMIT: ${{ github.sha }}
|
||||||
|
CI_M32: 0
|
||||||
|
COVERAGE: 1
|
||||||
|
VERILATOR_ARCHIVE: verilator-coverage-${{ github.sha }}.tar.gz
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
working-directory: repo
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
|
||||||
|
Build:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
CI_RUNS_ON: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
path: repo
|
||||||
|
|
||||||
|
- name: Install packages for build
|
||||||
|
run: ./ci/ci-install.bash
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: ./ci/ci-script.bash
|
||||||
|
|
||||||
|
- 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@v2
|
||||||
|
with:
|
||||||
|
path: ${{ github.workspace }}/${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
|
||||||
|
|
||||||
|
Test:
|
||||||
|
needs: Build
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
test:
|
||||||
|
- vlt-
|
||||||
|
- vltmt-
|
||||||
|
num:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
- 5
|
||||||
|
- 6
|
||||||
|
- 7
|
||||||
|
- 8
|
||||||
|
- 9
|
||||||
|
include:
|
||||||
|
- { test: dist, num: '' }
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
name: test-${{ matrix.test }}${{ matrix.num }}
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: test
|
||||||
|
CI_RUNS_ON: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Download tar archive
|
||||||
|
uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ env.VERILATOR_ARCHIVE }}
|
||||||
|
path: ${{ github.workspace }}
|
||||||
|
|
||||||
|
- name: Unpack tar 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
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
# DESCRIPTION: Github actions config
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
name: format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request_target:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
name: Ubuntu 20.04 | format
|
||||||
|
env:
|
||||||
|
CI_OS_NAME: linux
|
||||||
|
CI_RUNS_ON: ubuntu-20.04
|
||||||
|
CI_COMMIT: ${{ github.sha }}
|
||||||
|
CI_M32: 0
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Install packages for build
|
||||||
|
env:
|
||||||
|
CI_BUILD_STAGE_NAME: build
|
||||||
|
run: |
|
||||||
|
bash ci/ci-install.bash &&
|
||||||
|
sudo apt-get install clang-format-11 yapf3 &&
|
||||||
|
git config --global user.email "[email protected]" &&
|
||||||
|
git config --global user.name "github action"
|
||||||
|
- name: Format code
|
||||||
|
run: |
|
||||||
|
autoconf &&
|
||||||
|
./configure &&
|
||||||
|
make -j 2 format CLANGFORMAT=clang-format-11 &&
|
||||||
|
git status
|
||||||
|
- name: Push
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git status --porcelain)" ]; then
|
||||||
|
git commit . -m "Apply 'make format'" &&
|
||||||
|
git push origin
|
||||||
|
fi
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
\#*
|
\#*
|
||||||
.#*
|
.#*
|
||||||
|
.nfs*
|
||||||
*~
|
*~
|
||||||
*.tidy
|
*.tidy
|
||||||
*.old
|
*.old
|
||||||
@@ -14,9 +15,12 @@
|
|||||||
*.tex
|
*.tex
|
||||||
*.pdf
|
*.pdf
|
||||||
/Makefile
|
/Makefile
|
||||||
|
/.ccache
|
||||||
|
/artifact/
|
||||||
README
|
README
|
||||||
TAGS
|
TAGS
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
|
compile_commands.json
|
||||||
config.cache
|
config.cache
|
||||||
config.status
|
config.status
|
||||||
configure
|
configure
|
||||||
@@ -32,4 +36,6 @@ verilator_coverage_bin*
|
|||||||
verilator.pc
|
verilator.pc
|
||||||
verilator-config.cmake
|
verilator-config.cmake
|
||||||
verilator-config-version.cmake
|
verilator-config-version.cmake
|
||||||
|
**/__pycache__/*
|
||||||
|
**/_build/*
|
||||||
**/obj_dir/*
|
**/obj_dir/*
|
||||||
|
|||||||
-176
@@ -1,176 +0,0 @@
|
|||||||
# DESCRIPTION: Travis-CI config
|
|
||||||
#
|
|
||||||
# Copyright 2003-2019 by Todd Strader. 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 Perl Artistic License Version 2.0.
|
|
||||||
|
|
||||||
version: ~> 1.0
|
|
||||||
|
|
||||||
os: linux
|
|
||||||
language: cpp
|
|
||||||
cache: ccache
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- VERILATOR_CACHE=$HOME/verilator_cache
|
|
||||||
- VERILATOR_ROOT=$PWD
|
|
||||||
- VERILATOR_NUM_JOBS=$(echo `nproc` + 1 | bc)
|
|
||||||
- VERILATOR_CONFIG_FLAGS="--enable-maintainer-mode --enable-longtests"
|
|
||||||
- OBJCACHE=ccache
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- $VERILATOR_CACHE
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# Perl modules needed for testing
|
|
||||||
- yes yes | sudo cpan -fi Unix::Processors Parallel::Forker Bit::Vector
|
|
||||||
- sudo apt-get install gdb gtkwave
|
|
||||||
before_script:
|
|
||||||
- bash -x ci/build_verilator.sh
|
|
||||||
after_script:
|
|
||||||
- ccache -s
|
|
||||||
|
|
||||||
stages:
|
|
||||||
- "Build Verilator"
|
|
||||||
- test
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- if: type != cron
|
|
||||||
stage: "Build Verilator"
|
|
||||||
name: Build Verilator
|
|
||||||
compiler: gcc
|
|
||||||
script: echo "Done building Verilator"
|
|
||||||
# Non-cron build will just run on whatever linux flavor we get
|
|
||||||
- if: type != cron
|
|
||||||
stage: test
|
|
||||||
name: Dist test
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh dist
|
|
||||||
- if: type != cron
|
|
||||||
stage: test
|
|
||||||
name: Vlt test
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vlt
|
|
||||||
- if: type != cron
|
|
||||||
stage: test
|
|
||||||
name: Vltmt test
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vltmt
|
|
||||||
# Cron builds try different OS/compiler combinations
|
|
||||||
- if: type = cron
|
|
||||||
stage: "Build Verilator"
|
|
||||||
name: Build xenial gcc Verilator
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: gcc
|
|
||||||
script: echo "Done building Verilator"
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial gcc dist test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh dist
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial gcc vlt test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vlt
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial gcc vltmt test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vltmt
|
|
||||||
- if: type = cron
|
|
||||||
stage: "Build Verilator"
|
|
||||||
name: Build xenial clang Verilator
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: clang
|
|
||||||
script: echo "Done building Verilator"
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial clang dist test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: clang
|
|
||||||
script: ci/test.sh dist
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial clang vlt test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: clang
|
|
||||||
script: ci/test.sh vlt
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Xenial clang vltmt test
|
|
||||||
os: linux
|
|
||||||
dist: xenial
|
|
||||||
compiler: clang
|
|
||||||
script: ci/test.sh vltmt
|
|
||||||
# - if: type = cron
|
|
||||||
# stage: "Build Verilator"
|
|
||||||
# name: Build OSX gcc Verilator
|
|
||||||
# os: osx
|
|
||||||
# compiler: gcc
|
|
||||||
# script: echo "Done building Verilator"
|
|
||||||
# - if: type = cron
|
|
||||||
# stage: test
|
|
||||||
# name: OSX gcc dist test
|
|
||||||
# os: osx
|
|
||||||
# compiler: gcc
|
|
||||||
# script: ci/test.sh dist
|
|
||||||
# - if: type = cron
|
|
||||||
# stage: test
|
|
||||||
# name: OSX gcc vlt test
|
|
||||||
# os: osx
|
|
||||||
# compiler: gcc
|
|
||||||
# script: ci/test.sh vlt
|
|
||||||
# - if: type = cron
|
|
||||||
# stage: test
|
|
||||||
# name: OSX gcc vltmt test
|
|
||||||
# os: osx
|
|
||||||
# compiler: gcc
|
|
||||||
# script: ci/test.sh vltmt
|
|
||||||
- if: type = cron
|
|
||||||
stage: "Build Verilator"
|
|
||||||
name: Build trusty gcc Verilator
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
compiler: gcc
|
|
||||||
script: echo "Done building Verilator"
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Trusty gcc dist test
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh dist
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
name: Trusty gcc vlt test
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vlt
|
|
||||||
- if: type = cron
|
|
||||||
stage: test
|
|
||||||
os: linux
|
|
||||||
dist: trusty
|
|
||||||
name: Trusty gcc vltmt test
|
|
||||||
compiler: gcc
|
|
||||||
script: ci/test.sh vltmt
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
if: repo = verilator/verilator
|
|
||||||
recipients:
|
|
||||||
- [email protected]
|
|
||||||
- [email protected]
|
|
||||||
+15
-4
@@ -1,7 +1,9 @@
|
|||||||
|
\.ccache/
|
||||||
\.clang-format
|
\.clang-format
|
||||||
\.clang-tidy
|
\.clang-tidy
|
||||||
\.git/
|
\.git/
|
||||||
\.git$
|
\.git$
|
||||||
|
\.github/
|
||||||
\.svn/
|
\.svn/
|
||||||
\.(bak|old)/
|
\.(bak|old)/
|
||||||
\.(bak|old)$
|
\.(bak|old)$
|
||||||
@@ -17,16 +19,19 @@
|
|||||||
.*\.1
|
.*\.1
|
||||||
\.codacy\.yml
|
\.codacy\.yml
|
||||||
\.travis\.yml
|
\.travis\.yml
|
||||||
|
/_build/
|
||||||
/build/
|
/build/
|
||||||
/obj_dir/
|
|
||||||
/obj_dbg/
|
/obj_dbg/
|
||||||
|
/obj_dir/
|
||||||
|
/obj_dist/
|
||||||
|
/obj_iv/
|
||||||
|
/obj_ms/
|
||||||
/obj_nc/
|
/obj_nc/
|
||||||
/obj_opt/
|
/obj_opt/
|
||||||
/obj_vcs/
|
/obj_vcs/
|
||||||
/obj_vlt/
|
/obj_vlt/
|
||||||
/obj_vltmt/
|
/obj_vltmt/
|
||||||
/obj_dist/
|
INCA_libs/
|
||||||
/INCA_libs/
|
|
||||||
/cov_work/
|
/cov_work/
|
||||||
/logs/
|
/logs/
|
||||||
^Makefile$
|
^Makefile$
|
||||||
@@ -34,14 +39,19 @@ README.html
|
|||||||
bin/verilator_bin.*
|
bin/verilator_bin.*
|
||||||
bin/verilator_coverage_bin.*
|
bin/verilator_coverage_bin.*
|
||||||
docs/.*\.html$
|
docs/.*\.html$
|
||||||
docs/Makefile$
|
docs/_build/
|
||||||
|
docs/clang-format.txt$
|
||||||
docs/doxygen-doc/.*
|
docs/doxygen-doc/.*
|
||||||
|
docs/spelling.txt
|
||||||
examples/xml_py/copied/
|
examples/xml_py/copied/
|
||||||
examples/xml_py/graph.*
|
examples/xml_py/graph.*
|
||||||
|
sonar-project.properties
|
||||||
src/Makefile$
|
src/Makefile$
|
||||||
src/Makefile_obj$
|
src/Makefile_obj$
|
||||||
include/verilated.mk$
|
include/verilated.mk$
|
||||||
test_regress/.gdbinit$
|
test_regress/.gdbinit$
|
||||||
|
test_regress/transcript
|
||||||
|
codecov.yml
|
||||||
config.cache$
|
config.cache$
|
||||||
config.status$
|
config.status$
|
||||||
verilator\.log
|
verilator\.log
|
||||||
@@ -62,4 +72,5 @@ ci/
|
|||||||
/csrc/
|
/csrc/
|
||||||
obj_dir.*
|
obj_dir.*
|
||||||
TAGS
|
TAGS
|
||||||
|
gmon.out
|
||||||
.*~
|
.*~
|
||||||
|
|||||||
+133
-66
@@ -7,15 +7,11 @@
|
|||||||
#
|
#
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
# Copyright 2003-2019 by Wilson Snyder. This program is free software; you can
|
# Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
||||||
# 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
|
||||||
# Verilator is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
#
|
||||||
#****************************************************************************/
|
#****************************************************************************/
|
||||||
#
|
#
|
||||||
@@ -48,6 +44,7 @@
|
|||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
HOST = @HOST@
|
HOST = @HOST@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
|
||||||
DOXYGEN = doxygen
|
DOXYGEN = doxygen
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
@@ -55,10 +52,12 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
|||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
MAKEINFO = makeinfo
|
MAKEINFO = makeinfo
|
||||||
POD2TEXT = pod2text
|
POD2TEXT = pod2text
|
||||||
POD2LATEXFIX = $(srcdir)/src/pod2latexfix
|
|
||||||
MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs
|
MKINSTALLDIRS = $(SHELL) $(srcdir)/src/mkinstalldirs
|
||||||
PERL = @PERL@
|
PERL = @PERL@
|
||||||
|
|
||||||
|
# Version (for docs/guide/conf.py)
|
||||||
|
PACKAGE_VERSION_NUMBER = @PACKAGE_VERSION_NUMBER@
|
||||||
|
|
||||||
# Destination prefix for RPMs
|
# Destination prefix for RPMs
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
|
|
||||||
@@ -93,7 +92,6 @@ datarootdir = @datarootdir@
|
|||||||
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_LONGTESTS = @CFG_WITH_LONGTESTS@
|
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
|
||||||
CFG_WITH_THREADED = @CFG_WITH_THREADED@
|
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
#### End of system configuration section. ####
|
||||||
@@ -103,7 +101,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
|
|||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
SUBDIRS = src test_regress \
|
SUBDIRS = docs src test_regress \
|
||||||
examples/cmake_hello_c \
|
examples/cmake_hello_c \
|
||||||
examples/cmake_hello_sc \
|
examples/cmake_hello_sc \
|
||||||
examples/cmake_tracing_c \
|
examples/cmake_tracing_c \
|
||||||
@@ -114,39 +112,47 @@ SUBDIRS = src test_regress \
|
|||||||
examples/make_tracing_c \
|
examples/make_tracing_c \
|
||||||
examples/make_tracing_sc \
|
examples/make_tracing_sc \
|
||||||
examples/make_protect_lib \
|
examples/make_protect_lib \
|
||||||
|
examples/xml_py \
|
||||||
|
|
||||||
INFOS = verilator.txt verilator.html verilator.pdf
|
INFOS = verilator.html verilator.pdf
|
||||||
|
|
||||||
INFOS_OLD = README README.html README.pdf
|
INFOS_OLD = README README.html README.pdf
|
||||||
|
|
||||||
# Files that can be generated, but should be up to date for a distribution.
|
# Files that can be generated, but should be up to date for a distribution.
|
||||||
DISTDEP = info Makefile
|
DISTDEP = info Makefile
|
||||||
|
|
||||||
DISTFILES_INC = $(INFOS) .gitignore \
|
DISTFILES1 = $(INFOS) .gitignore \
|
||||||
*.in *.ac \
|
*.in *.ac \
|
||||||
Artistic \
|
Artistic \
|
||||||
Changes \
|
Changes \
|
||||||
LICENSE \
|
LICENSE \
|
||||||
MANIFEST.SKIP \
|
MANIFEST.SKIP \
|
||||||
README.adoc \
|
README.rst \
|
||||||
verilator-config.cmake.in \
|
verilator-config.cmake.in \
|
||||||
verilator-config-version.cmake.in \
|
verilator-config-version.cmake.in \
|
||||||
bin/verilator \
|
bin/verilator \
|
||||||
|
bin/verilator_ccache_report \
|
||||||
bin/verilator_coverage \
|
bin/verilator_coverage \
|
||||||
bin/verilator_difftree \
|
bin/verilator_difftree \
|
||||||
bin/verilator_gantt \
|
bin/verilator_gantt \
|
||||||
bin/verilator_includer \
|
bin/verilator_includer \
|
||||||
bin/verilator_profcfunc \
|
bin/verilator_profcfunc \
|
||||||
docs/.gitignore \
|
docs/.gitignore \
|
||||||
docs/CONTRIBUTING.adoc \
|
docs/CONTRIBUTING.rst \
|
||||||
docs/CONTRIBUTORS \
|
docs/CONTRIBUTORS \
|
||||||
docs/Makefile.in \
|
docs/Makefile \
|
||||||
docs/TODO \
|
docs/_static/*.png \
|
||||||
docs/doxygen-mainpage \
|
docs/_static/css/* \
|
||||||
docs/doxygen.config \
|
docs/bin/* \
|
||||||
docs/install.adoc \
|
docs/gen/* \
|
||||||
docs/internals.adoc \
|
docs/guide/*.py \
|
||||||
docs/verilator_logo.png \
|
docs/guide/*.rst \
|
||||||
|
docs/guide/figures/* \
|
||||||
|
docs/install.rst \
|
||||||
|
docs/internals.rst \
|
||||||
|
docs/internals.rst \
|
||||||
|
docs/verilated.dox \
|
||||||
|
docs/xml.rst \
|
||||||
install-sh configure *.pod \
|
install-sh configure *.pod \
|
||||||
include/*.[chv]* \
|
include/*.[chv]* \
|
||||||
include/*.in \
|
include/*.in \
|
||||||
@@ -156,12 +162,15 @@ DISTFILES_INC = $(INFOS) .gitignore \
|
|||||||
.*attributes */.*attributes */*/.*attributes \
|
.*attributes */.*attributes */*/.*attributes \
|
||||||
src/.*ignore src/*.in src/*.cpp src/*.[chly] \
|
src/.*ignore src/*.in src/*.cpp src/*.[chly] \
|
||||||
src/astgen src/bisonpre src/*fix src/cppcheck_filtered \
|
src/astgen src/bisonpre src/*fix src/cppcheck_filtered \
|
||||||
|
src/config_rev \
|
||||||
src/vlcovgen src/mkinstalldirs \
|
src/vlcovgen src/mkinstalldirs \
|
||||||
src/.gdbinit \
|
src/.gdbinit \
|
||||||
src/*.pl src/*.pod \
|
src/*.pl src/*.pod \
|
||||||
examples/*/.*ignore examples/*/Makefile* \
|
examples/*/.*ignore examples/*/Makefile* \
|
||||||
examples/*/*.[chv]* examples/*/vl_* \
|
examples/*/*.[chv]* examples/*/vl_* \
|
||||||
examples/*/CMakeLists.txt \
|
examples/*/CMakeLists.txt \
|
||||||
|
|
||||||
|
DISTFILES2 = \
|
||||||
test_*/.*ignore test_*/Makefile* test_*/*.cpp \
|
test_*/.*ignore test_*/Makefile* test_*/*.cpp \
|
||||||
test_*/*.pl test_*/*.v test_*/*.vc test_*/*.vh \
|
test_*/*.pl test_*/*.v test_*/*.vc test_*/*.vh \
|
||||||
test_regress/*.pl \
|
test_regress/*.pl \
|
||||||
@@ -173,6 +182,8 @@ DISTFILES_INC = $(INFOS) .gitignore \
|
|||||||
test_regress/t/t*/*.v* \
|
test_regress/t/t*/*.v* \
|
||||||
test_regress/t/t*/*/*.sv* \
|
test_regress/t/t*/*/*.sv* \
|
||||||
test_regress/t/t*/*/*.v* \
|
test_regress/t/t*/*/*.v* \
|
||||||
|
test_regress/t/t*/*.cpp \
|
||||||
|
test_regress/t/t*/CMakeLists.txt \
|
||||||
test_regress/t/*.cpp \
|
test_regress/t/*.cpp \
|
||||||
test_regress/t/*.h \
|
test_regress/t/*.h \
|
||||||
test_regress/t/*.dat \
|
test_regress/t/*.dat \
|
||||||
@@ -184,6 +195,7 @@ DISTFILES_INC = $(INFOS) .gitignore \
|
|||||||
|
|
||||||
INST_PROJ_FILES = \
|
INST_PROJ_FILES = \
|
||||||
bin/verilator \
|
bin/verilator \
|
||||||
|
bin/verilator_ccache_report \
|
||||||
bin/verilator_coverage \
|
bin/verilator_coverage \
|
||||||
bin/verilator_gantt \
|
bin/verilator_gantt \
|
||||||
bin/verilator_includer \
|
bin/verilator_includer \
|
||||||
@@ -194,11 +206,9 @@ INST_PROJ_FILES = \
|
|||||||
include/vltstd/*.[chv]* \
|
include/vltstd/*.[chv]* \
|
||||||
|
|
||||||
INST_PROJ_BIN_FILES = \
|
INST_PROJ_BIN_FILES = \
|
||||||
bin/verilator_bin \
|
bin/verilator_bin$(EXEEXT) \
|
||||||
bin/verilator_bin_dbg \
|
bin/verilator_bin_dbg$(EXEEXT) \
|
||||||
bin/verilator_coverage_bin_dbg \
|
bin/verilator_coverage_bin_dbg$(EXEEXT) \
|
||||||
|
|
||||||
DISTFILES := $(DISTFILES_INC)
|
|
||||||
|
|
||||||
EXAMPLES_FIRST = \
|
EXAMPLES_FIRST = \
|
||||||
examples/make_hello_c \
|
examples/make_hello_c \
|
||||||
@@ -206,12 +216,6 @@ EXAMPLES_FIRST = \
|
|||||||
|
|
||||||
EXAMPLES = $(EXAMPLES_FIRST) $(filter-out $(EXAMPLES_FIRST), $(sort $(wildcard examples/*)))
|
EXAMPLES = $(EXAMPLES_FIRST) $(filter-out $(EXAMPLES_FIRST), $(sort $(wildcard examples/*)))
|
||||||
|
|
||||||
ifeq ($(OBJCACHE_JOBS),)
|
|
||||||
ifneq ($(OBJCACHE_HOSTS),)
|
|
||||||
export OBJCACHE_JOBS := -j $(shell objcache --jobs "$(OBJCACHE_HOSTS)")
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||||
VL_INST_MAN_FILES = verilator.1 verilator_coverage.1 verilator_gantt.1 verilator_profcfunc.1
|
VL_INST_MAN_FILES = verilator.1 verilator_coverage.1 verilator_gantt.1 verilator_profcfunc.1
|
||||||
|
|
||||||
@@ -220,10 +224,10 @@ all: all_nomsg msg_test
|
|||||||
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)
|
all_nomsg: verilator_exe $(VL_INST_MAN_FILES)
|
||||||
|
|
||||||
.PHONY:verilator_exe
|
.PHONY:verilator_exe
|
||||||
.PHONY:verilator_bin
|
.PHONY:verilator_bin$(EXEEXT)
|
||||||
.PHONY:verilator_bin_dbg
|
.PHONY:verilator_bin_dbg$(EXEEXT)
|
||||||
.PHONY:verilator_coverage_bin_dbg
|
.PHONY:verilator_coverage_bin_dbg$(EXEEXT)
|
||||||
verilator_exe verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg:
|
verilator_exe verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT):
|
||||||
@echo ------------------------------------------------------------
|
@echo ------------------------------------------------------------
|
||||||
@echo "making verilator in src"
|
@echo "making verilator in src"
|
||||||
$(MAKE) -C src $(OBJCACHE_JOBS)
|
$(MAKE) -C src $(OBJCACHE_JOBS)
|
||||||
@@ -269,24 +273,18 @@ info: $(INFOS)
|
|||||||
%.1: ${srcdir}/bin/%
|
%.1: ${srcdir}/bin/%
|
||||||
pod2man $< $@
|
pod2man $< $@
|
||||||
|
|
||||||
verilator.txt: ${srcdir}/bin/verilator
|
.PHONY: verilator.html
|
||||||
$(POD2TEXT) $< $@
|
verilator.html:
|
||||||
|
$(MAKE) -C docs html
|
||||||
verilator.html: ${srcdir}/bin/verilator
|
|
||||||
pod2html $< >$@
|
|
||||||
|
|
||||||
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
# PDF needs DIST variables; but having configure.ac as dependency isn't detected
|
||||||
verilator.pdf: ${srcdir}/bin/verilator Makefile $(POD2LATEXFIX)
|
.PHONY: verilator.pdf
|
||||||
pod2latex --full --out verilator.tex $<
|
verilator.pdf: Makefile
|
||||||
$(PERL) $(POD2LATEXFIX) "$(DISTTITLE)" "${DISTDATE}" < verilator.tex > verilator2.tex
|
$(MAKE) -C docs verilator.pdf
|
||||||
mv verilator2.tex verilator.tex
|
|
||||||
pdflatex verilator.tex
|
|
||||||
pdflatex verilator.tex
|
|
||||||
-rm -f verilator.toc verilator.aux verilator.idx verilator.out
|
|
||||||
|
|
||||||
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
# See uninstall also - don't put wildcards in this variable, it might uninstall other stuff
|
||||||
VL_INST_BIN_FILES = verilator verilator_bin verilator_bin_dbg verilator_coverage_bin_dbg \
|
VL_INST_BIN_FILES = verilator verilator_bin$(EXEEXT) verilator_bin_dbg$(EXEEXT) verilator_coverage_bin_dbg$(EXEEXT) \
|
||||||
verilator_coverage verilator_gantt verilator_includer verilator_profcfunc
|
verilator_ccache_report verilator_coverage verilator_gantt verilator_includer verilator_profcfunc
|
||||||
# Some scripts go into both the search path and pkgdatadir,
|
# Some scripts go into both the search path and pkgdatadir,
|
||||||
# so they can be found by the user, and under $VERILATOR_ROOT.
|
# so they can be found by the user, and under $VERILATOR_ROOT.
|
||||||
|
|
||||||
@@ -310,11 +308,12 @@ installbin:
|
|||||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_coverage $(DESTDIR)$(bindir)/verilator_coverage )
|
||||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_gantt $(DESTDIR)$(bindir)/verilator_gantt )
|
||||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_profcfunc $(DESTDIR)$(bindir)/verilator_profcfunc )
|
||||||
( cd bin ; $(INSTALL_PROGRAM) verilator_bin $(DESTDIR)$(bindir)/verilator_bin )
|
( cd bin ; $(INSTALL_PROGRAM) verilator_bin$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin$(EXEEXT) )
|
||||||
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg $(DESTDIR)$(bindir)/verilator_bin_dbg )
|
( cd bin ; $(INSTALL_PROGRAM) verilator_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_bin_dbg$(EXEEXT) )
|
||||||
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg )
|
( cd bin ; $(INSTALL_PROGRAM) verilator_coverage_bin_dbg$(EXEEXT) $(DESTDIR)$(bindir)/verilator_coverage_bin_dbg$(EXEEXT) )
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/bin
|
||||||
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_includer $(DESTDIR)$(pkgdatadir)/bin/verilator_includer )
|
||||||
|
( cd ${srcdir}/bin ; $(INSTALL_PROGRAM) verilator_ccache_report $(DESTDIR)$(pkgdatadir)/bin/verilator_ccache_report )
|
||||||
|
|
||||||
# Man files can either be part of the original kit, or built in current directory
|
# Man files can either be part of the original kit, or built in current directory
|
||||||
# So important we use $^ so VPATH is searched
|
# So important we use $^ so VPATH is searched
|
||||||
@@ -344,6 +343,7 @@ installdata:
|
|||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
|
||||||
|
$(MKINSTALLDIRS) $(DESTDIR)$(pkgdatadir)/examples/xml_py
|
||||||
cd $(srcdir) \
|
cd $(srcdir) \
|
||||||
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
|
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
|
||||||
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/$$p; \
|
||||||
@@ -378,8 +378,8 @@ uninstall:
|
|||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_c
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_tracing_sc
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/cmake_protect_lib
|
||||||
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples/xml_py
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
-rmdir $(DESTDIR)$(pkgdatadir)/examples
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)/cmake
|
|
||||||
-rmdir $(DESTDIR)$(pkgdatadir)
|
-rmdir $(DESTDIR)$(pkgdatadir)
|
||||||
-rmdir $(DESTDIR)$(pkgconfigdir)
|
-rmdir $(DESTDIR)$(pkgconfigdir)
|
||||||
|
|
||||||
@@ -427,12 +427,16 @@ endif
|
|||||||
|
|
||||||
# Use --xml flag to see the cppcheck code to use for suppression
|
# Use --xml flag to see the cppcheck code to use for suppression
|
||||||
CPPCHECK_CPP = $(wildcard \
|
CPPCHECK_CPP = $(wildcard \
|
||||||
|
$(srcdir)/examples/*/*.cpp \
|
||||||
$(srcdir)/include/*.cpp \
|
$(srcdir)/include/*.cpp \
|
||||||
$(srcdir)/src/*.cpp )
|
$(srcdir)/src/*.cpp )
|
||||||
CPPCHECK_H = $(wildcard \
|
CPPCHECK_H = $(wildcard \
|
||||||
$(srcdir)/include/*.h \
|
$(srcdir)/include/*.h \
|
||||||
$(srcdir)/src/*.h )
|
$(srcdir)/src/*.h )
|
||||||
CPPCHECK = src/cppcheck_filtered
|
CPPCHECK_YL = $(wildcard \
|
||||||
|
$(srcdir)/src/*.y \
|
||||||
|
$(srcdir)/src/*.l )
|
||||||
|
CPPCHECK = src/cppcheck_filtered cppcheck
|
||||||
CPPCHECK_FLAGS = --enable=all --inline-suppr \
|
CPPCHECK_FLAGS = --enable=all --inline-suppr \
|
||||||
--suppress=unusedScopedObject --suppress=cstyleCast --suppress=useInitializationList \
|
--suppress=unusedScopedObject --suppress=cstyleCast --suppress=useInitializationList \
|
||||||
--suppress=nullPointerRedundantCheck
|
--suppress=nullPointerRedundantCheck
|
||||||
@@ -442,27 +446,85 @@ CPPCHECK_INC = -I$(srcdir)/include -I$(srcdir)/src/obj_dbg -I$(srcdir)/src
|
|||||||
|
|
||||||
cppcheck: $(CPPCHECK_DEP)
|
cppcheck: $(CPPCHECK_DEP)
|
||||||
%.cppcheck: %.cpp
|
%.cppcheck: %.cpp
|
||||||
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) $<
|
$(CPPCHECK) $(CPPCHECK_FLAGS) -DVL_DEBUG=1 -DVL_CPPCHECK=1 -DVL_THREADED=1 $(CPPCHECK_INC) $<
|
||||||
|
|
||||||
CLANGTIDY = clang-tidy
|
CLANGTIDY = clang-tidy
|
||||||
CLANGTIDY_FLAGS = -config=''
|
CLANGTIDY_FLAGS = -config='' -checks='-fuchsia-*,-cppcoreguidelines-avoid-c-arrays,-cppcoreguidelines-init-variables'
|
||||||
CLANGTIDY_DEP = $(subst .h,.h.tidy,$(CPPCHECK_H)) \
|
CLANGTIDY_DEP = $(subst .h,.h.tidy,$(CPPCHECK_H)) \
|
||||||
$(subst .cpp,.cpp.tidy,$(CPPCHECK_CPP))
|
$(subst .cpp,.cpp.tidy,$(CPPCHECK_CPP))
|
||||||
|
CLANGTIDY_DEFS = -DVL_DEBUG=1 -DVL_THREADED=1 -DVL_CPPCHECK=1
|
||||||
|
|
||||||
clangtidy: $(CLANGTIDY_DEP)
|
clang-tidy: $(CLANGTIDY_DEP)
|
||||||
%.cpp.tidy: %.cpp
|
%.cpp.tidy: %.cpp
|
||||||
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) | 2>&1 tee $@
|
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- $(CLANGTIDY_DEFS) $(CPPCHECK_INC) | 2>&1 tee $@
|
||||||
%.h.tidy: %.h
|
%.h.tidy: %.h
|
||||||
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- -DVL_DEBUG=1 -DVL_CPPCHECK=1 $(CPPCHECK_INC) | 2>&1 tee $@
|
$(CLANGTIDY) $(CLANGTIDY_FLAGS) $< -- $(CLANGTIDY_DEFS) $(CPPCHECK_INC) | 2>&1 tee $@
|
||||||
|
|
||||||
analyzer-src:
|
analyzer-src:
|
||||||
-rm -rf src/obj_dbg
|
-rm -rf src/obj_dbg
|
||||||
scan-build $(MAKE) -k verilator_coverage_bin_dbg verilator_bin_dbg
|
scan-build $(MAKE) -k verilator_coverage_bin_dbg$(EXEEXT) verilator_bin_dbg$(EXEEXT)
|
||||||
|
|
||||||
analyzer-include:
|
analyzer-include:
|
||||||
-rm -rf examples/*/obj*
|
-rm -rf examples/*/obj*
|
||||||
scan-build $(MAKE) -k examples
|
scan-build $(MAKE) -k examples
|
||||||
|
|
||||||
|
format: clang-format yapf format-pl-exec
|
||||||
|
|
||||||
|
CLANGFORMAT = clang-format-11
|
||||||
|
CLANGFORMAT_FLAGS = -i
|
||||||
|
CLANGFORMAT_FILES = $(CPPCHECK_CPP) $(CPPCHECK_H) $(CPPCHECK_YL) test_regress/t/*.c* test_regress/t/*.h
|
||||||
|
|
||||||
|
clang-format:
|
||||||
|
@$(CLANGFORMAT) --version | egrep 11.0 > /dev/null \
|
||||||
|
|| echo "*** You are not using clang-format 11.0, indents may differ from master's ***"
|
||||||
|
$(CLANGFORMAT) $(CLANGFORMAT_FLAGS) $(CLANGFORMAT_FILES)
|
||||||
|
|
||||||
|
PY_PROGRAMS = \
|
||||||
|
bin/verilator_ccache_report \
|
||||||
|
examples/xml_py/vl_file_copy \
|
||||||
|
examples/xml_py/vl_hier_graph \
|
||||||
|
docs/guide/conf.py \
|
||||||
|
docs/bin/vl_sphinx_extract \
|
||||||
|
docs/bin/vl_sphinx_fix \
|
||||||
|
src/astgen \
|
||||||
|
src/bisonpre \
|
||||||
|
src/config_rev \
|
||||||
|
src/cppcheck_filtered \
|
||||||
|
src/flexfix \
|
||||||
|
src/vlcovgen \
|
||||||
|
test_regress/t/*.pf \
|
||||||
|
nodist/code_coverage \
|
||||||
|
nodist/dot_importer \
|
||||||
|
nodist/fuzzer/actual_fail \
|
||||||
|
nodist/fuzzer/generate_dictionary \
|
||||||
|
nodist/install_test \
|
||||||
|
|
||||||
|
PY_FILES = \
|
||||||
|
$(PY_PROGRAMS) \
|
||||||
|
nodist/code_coverage.dat \
|
||||||
|
|
||||||
|
YAPF = yapf3
|
||||||
|
YAPF_FLAGS = -i
|
||||||
|
|
||||||
|
yapf:
|
||||||
|
$(YAPF) $(YAPF_FLAGS) $(PY_FILES)
|
||||||
|
|
||||||
|
FLAKE8 = flake8
|
||||||
|
FLAKE8_FLAGS = \
|
||||||
|
--extend-exclude=fastcov.py \
|
||||||
|
--ignore=E123,E129,E251,E501,W503,W504,E701
|
||||||
|
|
||||||
|
PYLINT = pylint
|
||||||
|
PYLINT_FLAGS = --disable=R0801
|
||||||
|
|
||||||
|
lint-py:
|
||||||
|
-$(FLAKE8) $(FLAKE8_FLAGS) $(PY_PROGRAMS)
|
||||||
|
-$(PYLINT) $(PYLINT_FLAGS) $(PY_PROGRAMS)
|
||||||
|
|
||||||
|
format-pl-exec:
|
||||||
|
-chmod a+x test_regress/t/*.pl
|
||||||
|
|
||||||
|
|
||||||
ftp: info
|
ftp: info
|
||||||
|
|
||||||
install-msg:
|
install-msg:
|
||||||
@@ -513,7 +575,9 @@ clean mostlyclean distclean maintainer-clean::
|
|||||||
rm -f *.tex
|
rm -f *.tex
|
||||||
rm -rf examples/*/obj_dir* examples/*/logs
|
rm -rf examples/*/obj_dir* examples/*/logs
|
||||||
rm -rf test_*/obj_dir
|
rm -rf test_*/obj_dir
|
||||||
|
rm -rf nodist/fuzzer/dictionary
|
||||||
rm -rf nodist/obj_dir
|
rm -rf nodist/obj_dir
|
||||||
|
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)
|
||||||
@@ -538,12 +602,10 @@ doxygen:
|
|||||||
|
|
||||||
dist-file-list:
|
dist-file-list:
|
||||||
@echo "begin-dist-file-list:"; # Scripts look for this
|
@echo "begin-dist-file-list:"; # Scripts look for this
|
||||||
@echo $(wildcard $(DISTFILES))
|
@echo $(wildcard $(DISTFILES1))
|
||||||
|
@echo $(wildcard $(DISTFILES2))
|
||||||
@echo "end-dist-file-list:"; # Scripts look for this
|
@echo "end-dist-file-list:"; # Scripts look for this
|
||||||
|
|
||||||
print-cfg-with-threaded:
|
|
||||||
@echo $(CFG_WITH_THREADED)
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Distributions
|
# Distributions
|
||||||
|
|
||||||
@@ -560,7 +622,12 @@ tag:
|
|||||||
# Don't depend on DISTFILES because there's no rule for "standards.info*".
|
# Don't depend on DISTFILES because there's no rule for "standards.info*".
|
||||||
dist: $(DISTDEP) maintainer-copy
|
dist: $(DISTDEP) maintainer-copy
|
||||||
-rm -fr $(DISTNAME)
|
-rm -fr $(DISTNAME)
|
||||||
for file in $(DISTFILES); do \
|
for file in $(DISTFILES1); do \
|
||||||
|
mkdir -p `dirname $(DISTNAME)/$$file` >/dev/null ; \
|
||||||
|
ln $$file $(DISTNAME)/$$file \
|
||||||
|
|| { echo copying $$file instead; cp -p $$file $(DISTNAME)/$$file;}; \
|
||||||
|
done; true;
|
||||||
|
for file in $(DISTFILES2); do \
|
||||||
mkdir -p `dirname $(DISTNAME)/$$file` >/dev/null ; \
|
mkdir -p `dirname $(DISTNAME)/$$file` >/dev/null ; \
|
||||||
ln $$file $(DISTNAME)/$$file \
|
ln $$file $(DISTNAME)/$$file \
|
||||||
|| { echo copying $$file instead; cp -p $$file $(DISTNAME)/$$file;}; \
|
|| { echo copying $$file instead; cp -p $$file $(DISTNAME)/$$file;}; \
|
||||||
|
|||||||
-140
@@ -1,140 +0,0 @@
|
|||||||
// Github doesn't render images unless absolute URL
|
|
||||||
:!toc:
|
|
||||||
|
|
||||||
ifdef::env-github[]
|
|
||||||
image:https://img.shields.io/badge/License-LGPL%20v3-blue.svg[license LGPLv3,link=https://www.gnu.org/licenses/lgpl-3.0]
|
|
||||||
image:https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg[license Artistic-2.0,link=https://opensource.org/licenses/Artistic-2.0]
|
|
||||||
image:https://api.codacy.com/project/badge/Grade/ff998fdaa6f64b9a95eb5f342ee6bf4d[Code Quality,link=https://www.codacy.com/manual/wsnyder/verilator]
|
|
||||||
image:https://travis-ci.com/verilator/verilator.svg?branch=master[Build Status (Travis CI),link=https://travis-ci.com/verilator/verilator]
|
|
||||||
endif::[]
|
|
||||||
|
|
||||||
ifdef::env-github[]
|
|
||||||
:link_verilator_contributing: link:docs/CONTRIBUTING.adoc
|
|
||||||
:link_verilator_install: link:docs/install.adoc
|
|
||||||
endif::[]
|
|
||||||
ifndef::env-github[]
|
|
||||||
:link_verilator_contributing: https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.adoc
|
|
||||||
:link_verilator_install: https://verilator.org/install
|
|
||||||
endif::[]
|
|
||||||
|
|
||||||
== Welcome to Verilator
|
|
||||||
|
|
||||||
[cols="a,a",indent=0,frame="none"]
|
|
||||||
|===
|
|
||||||
^.^| *Welcome to Verilator, the fastest free Verilog HDL simulator.*
|
|
||||||
+++ <br/> +++ • Accepts synthesizable Verilog or SystemVerilog
|
|
||||||
+++ <br/> +++ • Performs lint code-quality checks
|
|
||||||
+++ <br/> +++ • Compiles into multithreaded {cpp}, SystemC, or (soon) {cpp}-under-Python
|
|
||||||
+++ <br/> +++ • Creates XML to front-end your own tools
|
|
||||||
<.^|image:https://www.veripool.org/img/verilator_256_200_min.png[Logo,256,200]
|
|
||||||
|
|
||||||
>.^|image:https://www.veripool.org/img/verilator_multithreaded_performance_bg-min.png[,388,178]
|
|
||||||
^.^| *Fast*
|
|
||||||
+++ <br/> +++ • Outperforms many commercial simulators
|
|
||||||
+++ <br/> +++ • Single- and multi-threaded output models
|
|
||||||
|
|
||||||
^.^| *Widely Used*
|
|
||||||
+++ <br/> +++ • Wide industry and academic deployment
|
|
||||||
+++ <br/> +++ • Out-of-the-box support from Arm, and RISC-V vendor IP
|
|
||||||
<.^|image:https://www.veripool.org/img/verilator_usage_400x200-min.png[,400,200]
|
|
||||||
|
|
||||||
>.^|image:https://www.veripool.org/img/chips_alliance_logo_225x75-min.png[CHIPS Alliance,link=https://chipsalliance.org]
|
|
||||||
image:https://www.veripool.org/img/osi_logo_125x125-min.png[,125,125]
|
|
||||||
^.^| *Community Driven & Openly Licensed*
|
|
||||||
+++ <br/> +++ • Guided by the https://chipsalliance.org/[CHIPS Alliance] and https://www.linuxfoundation.org/[Linux Foundation]
|
|
||||||
+++ <br/> +++ • Open, and free as in both speech and beer
|
|
||||||
+++ <br/> +++ • More simulation for your verification budget
|
|
||||||
|===
|
|
||||||
|
|
||||||
== What Verilator Does
|
|
||||||
|
|
||||||
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
|
|
||||||
"Verilates" the specified synthesizable Verilog or SystemVerilog code by
|
|
||||||
reading it, performing lint checks, and optionally inserting assertion
|
|
||||||
checks and coverage-analysis points. It outputs single- or multi-threaded
|
|
||||||
.cpp and .h files, the "Verilated" code.
|
|
||||||
|
|
||||||
The user writes a little {cpp}/SystemC wrapper file, which instantiates the
|
|
||||||
"Verilated" model of the user's top level module. These {cpp}/SystemC
|
|
||||||
files are then compiled by a {cpp} compiler (gcc/clang/MSVC++). The
|
|
||||||
resulting executable performs the design simulation. Verilator also
|
|
||||||
supports linking its generated libraries, optionally encrypted, into other
|
|
||||||
simulators.
|
|
||||||
|
|
||||||
Verilator may not be the best choice if you are expecting a full featured
|
|
||||||
replacement for NC-Verilog, VCS or another commercial Verilog simulator, or
|
|
||||||
if you are looking for a behavioral Verilog simulator e.g. for a quick
|
|
||||||
class project (we recommend http://iverilog.icarus.com[Icarus Verilog] for
|
|
||||||
this.) However, if you are looking for a path to migrate synthesizable
|
|
||||||
Verilog to {cpp} or SystemC, and your team is comfortable writing just a
|
|
||||||
touch of {cpp} code, Verilator is the tool for you.
|
|
||||||
|
|
||||||
== Performance
|
|
||||||
|
|
||||||
Verilator does not simply convert Verilog HDL to {cpp} or SystemC. Rather
|
|
||||||
than only translate, Verilator compiles your code into a much faster
|
|
||||||
optimized and optionally thread-partitioned model, which is in turn wrapped
|
|
||||||
inside a {cpp}/SystemC/Python module. The results are a compiled Verilog
|
|
||||||
model that executes even on a single-thread over 10x faster than standalone
|
|
||||||
SystemC, and on a single thread is about 100 times faster than interpreted
|
|
||||||
Verilog simulators such as http://iverilog.icarus.com[Icarus
|
|
||||||
Verilog]. Another 2-10x speedup might be gained from multithreading
|
|
||||||
(yielding 200-1000x total over interpreted simulators).
|
|
||||||
|
|
||||||
Verilator has typically similar or better performance versus the commercial
|
|
||||||
Verilog simulators (Carbon Design Systems Carbonator, Modelsim, Cadence
|
|
||||||
Incisive/NC-Verilog, Synopsys VCS, VTOC, and Pragmatic CVer/CVC). But,
|
|
||||||
Verilator is free, so you can spend on computes rather than licenses. Thus
|
|
||||||
Verilator gives you more cycles/dollar than anything else available.
|
|
||||||
|
|
||||||
For more information on how Verilator stacks up to some of the other
|
|
||||||
commercial and free Verilog simulators, see the
|
|
||||||
https://www.veripool.org/verilog_sim_benchmarks.html[Verilog Simulator
|
|
||||||
Benchmarks]. (If you benchmark Verilator, please see the notes in the
|
|
||||||
https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)], and also
|
|
||||||
if possible post on the forums the results; there may be additional tweaks
|
|
||||||
possible.)
|
|
||||||
|
|
||||||
== Installation & Documentation
|
|
||||||
|
|
||||||
For more information:
|
|
||||||
|
|
||||||
* {link_verilator_install}[Verilator installation and package directory
|
|
||||||
structure]
|
|
||||||
|
|
||||||
* https://verilator.org/verilator_doc.html[Verilator manual (HTML)],
|
|
||||||
or https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)]
|
|
||||||
|
|
||||||
* https://verilator.org/forum[Verilator forum]
|
|
||||||
|
|
||||||
* https://verilator.org/issues[Verilator Issues]
|
|
||||||
|
|
||||||
== Community Supported
|
|
||||||
|
|
||||||
Verilator is a community project, guided by the
|
|
||||||
https://chipsalliance.org/[CHIPS Alliance] under the
|
|
||||||
https://www.linuxfoundation.org/[Linux Foundation].
|
|
||||||
|
|
||||||
We appreciate and welcome your contributions in whatever form; please see
|
|
||||||
{link_verilator_contributing}[Contributing to Verilator]. Thanks to our
|
|
||||||
https://verilator.org/verilator_doc.html#CONTRIBUTORS[Contributors and
|
|
||||||
Sponsors].
|
|
||||||
|
|
||||||
== Related Projects
|
|
||||||
|
|
||||||
* http://gtkwave.sourceforge.net/[GTKwave] - Waveform viewer for Verilator
|
|
||||||
traces.
|
|
||||||
|
|
||||||
* http://iverilog.icarus.com[Icarus Verilog] - Icarus is a full featured
|
|
||||||
interpreted Verilog simulator. If Verilator does not support your needs,
|
|
||||||
perhaps Icarus may.
|
|
||||||
|
|
||||||
== Open License
|
|
||||||
|
|
||||||
Verilator is Copyright 2003-2019 by Wilson Snyder. (Report bugs to
|
|
||||||
https://verilator.org/issues[Verilator Issues].)
|
|
||||||
|
|
||||||
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
|
|
||||||
Perl Artistic License Version 2.0. (See the documentation for more
|
|
||||||
details.)
|
|
||||||
+151
@@ -0,0 +1,151 @@
|
|||||||
|
.. Github doesn't render images unless absolute URL
|
||||||
|
.. Do not know of a conditional tag, "only: github" nor "github display" works
|
||||||
|
|
||||||
|
.. image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
|
||||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0]
|
||||||
|
.. image:: https://img.shields.io/badge/License-Artistic%202.0-0298c3.svg
|
||||||
|
:target: https://opensource.org/licenses/Artistic-2.0
|
||||||
|
.. image:: https://api.codacy.com/project/badge/Grade/fa78caa433c84a4ab9049c43e9debc6f
|
||||||
|
:target: https://www.codacy.com/gh/verilator/verilator
|
||||||
|
.. image:: https://codecov.io/gh/verilator/verilator/branch/master/graph/badge.svg
|
||||||
|
:target: https://codecov.io/gh/verilator/verilator
|
||||||
|
.. image:: https://github.com/verilator/verilator/workflows/build/badge.svg
|
||||||
|
:target: https://github.com/verilator/verilator/actions?query=workflow%3Abuild
|
||||||
|
|
||||||
|
Welcome to Verilator
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - **Welcome to Verilator, the fastest Verilog/SystemVerilog simulator.**
|
||||||
|
* Accepts synthesizable Verilog or SystemVerilog
|
||||||
|
* Performs lint code-quality checks
|
||||||
|
* Compiles into multithreaded C++, or SystemC
|
||||||
|
* Creates XML to front-end your own tools
|
||||||
|
- |Logo|
|
||||||
|
* - |verilator multithreaded performance|
|
||||||
|
- **Fast**
|
||||||
|
* Outperforms many commercial simulators
|
||||||
|
* Single- and multi-threaded output models
|
||||||
|
* - **Widely Used**
|
||||||
|
* Wide industry and academic deployment
|
||||||
|
* Out-of-the-box support from Arm, and RISC-V vendor IP
|
||||||
|
- |verilator usage|
|
||||||
|
* - |verilator community|
|
||||||
|
- **Community Driven & Openly Licensed**
|
||||||
|
* Guided by the `CHIPS Alliance`_ and `Linux Foundation`_
|
||||||
|
* Open, and free as in both speech and beer
|
||||||
|
* More simulation for your verification budget
|
||||||
|
* - **Commercial Support Available**
|
||||||
|
* Commercial support contracts
|
||||||
|
* Design support contracts
|
||||||
|
* Enhancement contracts
|
||||||
|
- |verilator support|
|
||||||
|
|
||||||
|
|
||||||
|
What Verilator Does
|
||||||
|
===================
|
||||||
|
|
||||||
|
Verilator is invoked with parameters similar to GCC or Synopsys's VCS. It
|
||||||
|
"Verilates" the specified Verilog or SystemVerilog code by reading it,
|
||||||
|
performing lint checks, and optionally inserting assertion checks and
|
||||||
|
coverage-analysis points. It outputs single- or multi-threaded .cpp and .h
|
||||||
|
files, the "Verilated" code.
|
||||||
|
|
||||||
|
The user writes a little C++/SystemC wrapper file, which instantiates the
|
||||||
|
"Verilated" model of the user's top level module. These C++/SystemC files
|
||||||
|
are then compiled by a C++ compiler (gcc/clang/MSVC++). The resulting
|
||||||
|
executable performs the design simulation. Verilator also supports linking
|
||||||
|
its generated libraries, optionally encrypted, into other simulators.
|
||||||
|
|
||||||
|
Verilator may not be the best choice if you are expecting a full featured
|
||||||
|
replacement for NC-Verilog, VCS or another commercial Verilog simulator, or
|
||||||
|
if you are looking for a behavioral Verilog simulator e.g. for a quick
|
||||||
|
class project (we recommend `Icarus Verilog`_ for this.) However, if you
|
||||||
|
are looking for a path to migrate SystemVerilog to C++ or SystemC, or your
|
||||||
|
team is comfortable writing just a touch of C++ code, Verilator is the tool
|
||||||
|
for you.
|
||||||
|
|
||||||
|
|
||||||
|
Performance
|
||||||
|
===========
|
||||||
|
|
||||||
|
Verilator does not simply convert Verilog HDL to C++ or SystemC. Rather,
|
||||||
|
Verilator compiles your code into a much faster optimized and optionally
|
||||||
|
thread-partitioned model, which is in turn wrapped inside a C++/SystemC
|
||||||
|
module. The results are a compiled Verilog model that executes even on a
|
||||||
|
single-thread over 10x faster than standalone SystemC, and on a single
|
||||||
|
thread is about 100 times faster than interpreted Verilog simulators such
|
||||||
|
as `Icarus Verilog`_. Another 2-10x speedup might be gained from
|
||||||
|
multithreading (yielding 200-1000x total over interpreted simulators).
|
||||||
|
|
||||||
|
Verilator has typically similar or better performance versus the
|
||||||
|
closed-source Verilog simulators (Carbon Design Systems Carbonator,
|
||||||
|
Modelsim, Cadence Incisive/NC-Verilog, Synopsys VCS, VTOC, and Pragmatic
|
||||||
|
CVer/CVC). But, Verilator is open-sourced, so you can spend on computes
|
||||||
|
rather than licenses. Thus Verilator gives you the best cycles/dollar.
|
||||||
|
|
||||||
|
Installation & Documentation
|
||||||
|
============================
|
||||||
|
|
||||||
|
For more information:
|
||||||
|
|
||||||
|
- `Verilator installation and package directory structure
|
||||||
|
<https://verilator.org/install>`_
|
||||||
|
|
||||||
|
- `Verilator manual (HTML) <https://verilator.org/verilator_doc.html>`_,
|
||||||
|
or `Verilator manual (PDF) <https://verilator.org/verilator_doc.pdf>`_
|
||||||
|
|
||||||
|
- `Subscribe to verilator announcements
|
||||||
|
<https://github.com/verilator/verilator-announce>`_
|
||||||
|
|
||||||
|
- `Verilator forum <https://verilator.org/forum>`_
|
||||||
|
|
||||||
|
- `Verilator issues <https://verilator.org/issues>`_
|
||||||
|
|
||||||
|
|
||||||
|
Support
|
||||||
|
=======
|
||||||
|
|
||||||
|
Verilator is a community project, guided by the `CHIPS Alliance`_ under the
|
||||||
|
`Linux Foundation`_.
|
||||||
|
|
||||||
|
We appreciate and welcome your contributions in whatever form; please see
|
||||||
|
`Contributing to Verilator
|
||||||
|
<https://github.com/verilator/verilator/blob/master/docs/CONTRIBUTING.rst>`_.
|
||||||
|
Thanks to our `Contributors and Sponsors
|
||||||
|
<https://verilator.org/guide/latest/contributors.html>`_.
|
||||||
|
|
||||||
|
Verilator also supports and encourages commercial support models and
|
||||||
|
organizations; please see `Verilator Commercial Support
|
||||||
|
<https://verilator.org/verilator_commercial_support>`_.
|
||||||
|
|
||||||
|
|
||||||
|
Related Projects
|
||||||
|
================
|
||||||
|
|
||||||
|
- `GTKwave <http://gtkwave.sourceforge.net/>`_ - Waveform viewer for
|
||||||
|
Verilator traces.
|
||||||
|
|
||||||
|
- `Icarus Verilog`_ - Icarus is a full featured interpreted Verilog
|
||||||
|
simulator. If Verilator does not support your needs, perhaps Icarus may.
|
||||||
|
|
||||||
|
|
||||||
|
Open License
|
||||||
|
============
|
||||||
|
|
||||||
|
Verilator is Copyright 2003-2021 by Wilson Snyder. (Report bugs to
|
||||||
|
`Verilator Issues <https://verilator.org/issues>`_.)
|
||||||
|
|
||||||
|
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
|
||||||
|
Perl Artistic License Version 2.0. See the documentation for more details.
|
||||||
|
|
||||||
|
.. _CHIPS Alliance: https://chipsalliance.org
|
||||||
|
.. _Icarus Verilog: http://iverilog.icarus.com
|
||||||
|
.. _Linux Foundation: https://www.linuxfoundation.org
|
||||||
|
.. |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 usage| image:: https://www.veripool.org/img/verilator_usage_400x200-min.png
|
||||||
|
.. |verilator community| image:: https://www.veripool.org/img/verilator_community_400x125-min.png
|
||||||
|
.. |verilator support| image:: https://www.veripool.org/img/verilator_support_400x125-min.png
|
||||||
+93
-4644
File diff suppressed because it is too large
Load Diff
Executable
+94
@@ -0,0 +1,94 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# pylint: disable=C0103,C0114,C0115,C0116,C0123,C0301,R0902,R0913,R0914,R0912,R0915,W0621
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import collections
|
||||||
|
import pathlib
|
||||||
|
import re
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
allow_abbrev=False,
|
||||||
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
|
description="""Report ccache behavior of a Verilated model build.""",
|
||||||
|
epilog=
|
||||||
|
"""Copyright 2002-2021 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""")
|
||||||
|
|
||||||
|
parser.add_argument('-o',
|
||||||
|
type=argparse.FileType('w'),
|
||||||
|
metavar="OUTFILE",
|
||||||
|
required=True,
|
||||||
|
help='output file')
|
||||||
|
parser.add_argument('logdir', type=pathlib.Path, help='log directory')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
results = {}
|
||||||
|
elapsed = {}
|
||||||
|
|
||||||
|
|
||||||
|
def toDateTime(s):
|
||||||
|
return datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%f")
|
||||||
|
|
||||||
|
|
||||||
|
for logfile in args.logdir.iterdir():
|
||||||
|
with logfile.open() as fh:
|
||||||
|
start = None
|
||||||
|
obj = None
|
||||||
|
for line in fh:
|
||||||
|
line = line.strip()
|
||||||
|
match = re.match(r'\[(\S+)\s.*Object file: (.*)$', line)
|
||||||
|
if match:
|
||||||
|
start = toDateTime(match.group(1))
|
||||||
|
obj = match.group(2)
|
||||||
|
match = re.match(r'\[(\S+)\s.*Result: (.*)$', line)
|
||||||
|
if match:
|
||||||
|
assert obj is not None
|
||||||
|
elapsed[obj] = toDateTime(match.group(1)) - start
|
||||||
|
results[obj] = match.group(2)
|
||||||
|
|
||||||
|
args.o.write("#" * 80 + "\n")
|
||||||
|
args.o.write("ccache report (from verilator_ccache_report) :\n")
|
||||||
|
|
||||||
|
if not results:
|
||||||
|
args.o.write("\nAll object files up to date\n")
|
||||||
|
else:
|
||||||
|
args.o.write("\nCompiled object files:\n")
|
||||||
|
wnames = max(len(_) for _ in results) + 1
|
||||||
|
wresults = max(len(_) for _ in results.values()) + 1
|
||||||
|
for k in sorted(results.keys()):
|
||||||
|
args.o.write("{:{wnames}} : {:{wresults}} : {}s\n".format(
|
||||||
|
k,
|
||||||
|
results[k],
|
||||||
|
elapsed[k].total_seconds(),
|
||||||
|
wnames=wnames,
|
||||||
|
wresults=wresults))
|
||||||
|
|
||||||
|
args.o.write("\nSummary:\n")
|
||||||
|
counts = collections.Counter(_ for _ in results.values())
|
||||||
|
total = sum(counts.values())
|
||||||
|
for k in sorted(counts.keys()):
|
||||||
|
c = counts[k]
|
||||||
|
args.o.write("{:{width}}| {} ({:.2%})\n".format(k,
|
||||||
|
c,
|
||||||
|
c / total,
|
||||||
|
width=wresults))
|
||||||
|
|
||||||
|
args.o.write("\nLongest:\n")
|
||||||
|
longest = sorted(list(elapsed.items()),
|
||||||
|
key=lambda kv: -kv[1].total_seconds())
|
||||||
|
for i, (k, v) in enumerate(longest):
|
||||||
|
args.o.write("{:{width}}| {}s\n".format(k,
|
||||||
|
v.total_seconds(),
|
||||||
|
width=wnames))
|
||||||
|
if i > 4:
|
||||||
|
break
|
||||||
|
|
||||||
|
args.o.write("#" * 80 + "\n")
|
||||||
+32
-115
@@ -1,18 +1,11 @@
|
|||||||
: # -*-Mode: perl;-*- use perl, wherever it is
|
#!/usr/bin/env perl
|
||||||
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
||||||
if 0;
|
|
||||||
######################################################################
|
######################################################################
|
||||||
#
|
#
|
||||||
# Copyright 2003-2019 by Wilson Snyder. This program is free software; you
|
# Copyright 2003-2021 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.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 5.006_001;
|
require 5.006_001;
|
||||||
@@ -163,129 +156,53 @@ verilator_coverage - Verilator coverage analyzer
|
|||||||
|
|
||||||
verilator_coverage -write merged.dat -read <datafiles>...
|
verilator_coverage -write merged.dat -read <datafiles>...
|
||||||
|
|
||||||
Verilator_coverage processes Verilator coverage reports.
|
verilator_coverage -write-info merged.info -read <datafiles>...
|
||||||
|
|
||||||
With --anotate, it reads the specified data file and generates annotated
|
Verilator_coverage processes Verilated model-generated coverage reports.
|
||||||
source code with coverage metrics annotated. If multiple coverage points
|
|
||||||
exist on the same line, additional lines will be inserted to report the
|
|
||||||
additional points.
|
|
||||||
|
|
||||||
Additional Verilog-standard arguments specify the search paths necessary to
|
For documentation see
|
||||||
find the source code that the coverage analysis was performed on.
|
L<https://verilator.org/guide/latest/exe_verilator_coverage.html>.
|
||||||
|
|
||||||
To get correct coverage percentages, you may wish to read logs/coverage.dat
|
=head1 ARGUMENT SUMMARY
|
||||||
into Emacs and do a M-x keep-lines to include only those statistics of
|
|
||||||
interest.
|
|
||||||
|
|
||||||
For Verilog conditions that should never occur, you should add a $stop
|
<filename> Specify input data filename, default "coverage.dat"
|
||||||
statement. This will remove the coverage during the next build.
|
--annotate <output_dir> Directory name for source annotation.
|
||||||
|
--annotate-all All files should be shown.
|
||||||
|
--annotate-min <count> Minimum occurrence count for uncovered.
|
||||||
|
--help Displays this message and version and exits.
|
||||||
|
--rank Compute relative importance of tests.
|
||||||
|
--unlink With --write, unlink all inputs
|
||||||
|
--version Displays program version and exits.
|
||||||
|
--write <filename> Write aggregate coverage results.
|
||||||
|
--write-info <filename.info> Write lcov .info.
|
||||||
|
|
||||||
=head1 ARGUMENTS
|
+libext+I<ext>+I<ext>... Extensions for Verilog files.
|
||||||
|
+define+I<var>+I<value> Defines the given variable.
|
||||||
=over 4
|
-DI<var>=I<value> Defines the given variable.
|
||||||
|
+incdir+I<dir> Add directory for finding include files.
|
||||||
=item I<filename>
|
-II<dir> Add directory for finding include files.
|
||||||
|
-y I<dir> Specifies module search directory.
|
||||||
Specify input data file, may be repeated to read multiple inputs. If no
|
|
||||||
data file is specified, by default coverage.dat is read.
|
|
||||||
|
|
||||||
=item --annotate I<output_directory>
|
|
||||||
|
|
||||||
Sprcifies the directory name that source files with annotated coverage data
|
|
||||||
should be written to.
|
|
||||||
|
|
||||||
=item --annotate-all
|
|
||||||
|
|
||||||
Specifies all files should be shown. By default, only those source files
|
|
||||||
which have low coverage are written to the output directory.
|
|
||||||
|
|
||||||
=item --annotate-min I<count>
|
|
||||||
|
|
||||||
Specifies the minimum occurrence count that should be flagged if the
|
|
||||||
coverage point does not include a specified threshold. Defaults to 10.
|
|
||||||
|
|
||||||
=item --help
|
|
||||||
|
|
||||||
Displays this message and program version and exits.
|
|
||||||
|
|
||||||
=item --rank
|
|
||||||
|
|
||||||
Print an experimental report listing the relative importance of each test
|
|
||||||
in covering all of the coverage points. The report shows "Covered" which
|
|
||||||
indicates the number of points that test covers; a test is considered to
|
|
||||||
cover a point if it has a bucket count of at least 1. The "rank" column has
|
|
||||||
a higher number t indicate the test is more important, and rank 0 means the
|
|
||||||
test does not need to be run to cover the points. "RankPts" indicates the
|
|
||||||
number of coverage points this test will contribute to overall coverage if
|
|
||||||
all tests are run in the order of highest to lowest rank.
|
|
||||||
|
|
||||||
=item --unlink
|
|
||||||
|
|
||||||
When using --write to combine coverage data, unlink all input files after
|
|
||||||
the output has been created.
|
|
||||||
|
|
||||||
=item --version
|
|
||||||
|
|
||||||
Displays program version and exits.
|
|
||||||
|
|
||||||
=item --write I<filename>
|
|
||||||
|
|
||||||
Specifies the aggregate coverage results, summed across all the files,
|
|
||||||
should be written to the given filename. This is useful in scripts to
|
|
||||||
combine many sequential runs into one master coverage file.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 VERILOG ARGUMENTS
|
|
||||||
|
|
||||||
The following arguments are compatible with GCC, VCS and most Verilog
|
|
||||||
programs.
|
|
||||||
|
|
||||||
=over 4
|
|
||||||
|
|
||||||
=item +libext+I<ext>+I<ext>...
|
|
||||||
|
|
||||||
Defines the extensions for Verilog files.
|
|
||||||
|
|
||||||
=item +define+I<var>+I<value>
|
|
||||||
=item -DI<var>=I<value>
|
|
||||||
|
|
||||||
Defines the given variable.
|
|
||||||
|
|
||||||
=item +incdir+I<dir>
|
|
||||||
=item -II<dir>
|
|
||||||
|
|
||||||
Specifies a directory for finding include files.
|
|
||||||
|
|
||||||
=item -f I<file>
|
|
||||||
|
|
||||||
Specifies a file containing additional command line arguments.
|
|
||||||
|
|
||||||
=item -y I<dir>
|
|
||||||
|
|
||||||
Specifies a module search directory.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2003-2019 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
||||||
redistribute it and/or modify the Verilator internals under the terms of
|
can redistribute it and/or modify the Verilator internals under the terms
|
||||||
either the GNU Lesser General Public License Version 3 or the Perl Artistic
|
of either the GNU Lesser General Public License Version 3 or the Perl
|
||||||
License Version 2.0.
|
Artistic License Version 2.0.
|
||||||
|
|
||||||
=head1 AUTHORS
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Wilson Snyder <[email protected]>
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
C<verilator>
|
C<verilator>, C<lcov>
|
||||||
|
|
||||||
L<verilator_coverage --help> which is the source for this document.
|
L<verilator_coverage --help> which is the source for this document.
|
||||||
|
|
||||||
|
and L<https://verilator.org/guide/latest/exe_verilator_coverage.html> for
|
||||||
|
detailed documentation.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
+9
-32
@@ -1,10 +1,7 @@
|
|||||||
: # -*-Mode: perl;-*- use perl, wherever it is
|
#!/usr/bin/env perl
|
||||||
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
||||||
if 0;
|
|
||||||
# See copyright, etc in below POD section.
|
# See copyright, etc in below POD section.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 5.006_001;
|
|
||||||
use warnings;
|
use warnings;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use IO::File;
|
use IO::File;
|
||||||
@@ -12,22 +9,6 @@ use Pod::Usage;
|
|||||||
use strict;
|
use strict;
|
||||||
use vars qw($Debug);
|
use vars qw($Debug);
|
||||||
|
|
||||||
#======================================================================
|
|
||||||
|
|
||||||
# Old version 1 dump nodes with no dtypep's
|
|
||||||
our %Ver1_Non_Dtyped = map {$_ => 1} qw(
|
|
||||||
ACTIVE ALWAYS ALWAYSPOST ALWAYSPUBLIC ATTROF BEGIN BREAK CASE CASEITEM
|
|
||||||
CCALL CELL CELLINLINE CFILE CFUNC CHANGEDET CLOCKING COMMENT CONTINUE
|
|
||||||
COVERDECL COVERINC COVERTOGGLE CRETURN CSTMT DEFPARAM DISABLE DISPLAY DOT
|
|
||||||
DPIEXPORT FCLOSE FFLUSH FINAL FINISH FOPEN GENCASE GENERATE GENFOR GENIF
|
|
||||||
IF IMPLICIT INITARRAY INITIAL JUMPGO JUMPLABEL MODULE NETLIST
|
|
||||||
NOTFOUNDMODULE PACKAGE PACKAGEIMPORT PARSEREF PIN PORT PRAGMA PRIMITIVE
|
|
||||||
PSLASSERT PSLCOVER PSLDEFCLOCK PULL RANGE READMEM REPEAT RETURN SCCTOR
|
|
||||||
SCDTOR SCHDR SCIMP SCIMPHDR SCINT SCOPE SELBIT SELEXTRACT SELMINUS
|
|
||||||
SELPLUS SENGATE SENITEM SENTREE SFORMAT SFORMATF STOP SYSIGNORE SYSTEMT
|
|
||||||
TASK TASKREF TEXT TOPSCOPE TYPEDEFFWD TYPETABLE UCSTMT UDPTABLE
|
|
||||||
UDPTABLELINE UNTILSTABLE VASSERT WHILE );
|
|
||||||
|
|
||||||
#======================================================================
|
#======================================================================
|
||||||
# main
|
# main
|
||||||
|
|
||||||
@@ -136,8 +117,6 @@ sub filter {
|
|||||||
$line =~ s/{[a-z]*\d+}/{}/g if !$Opt_Lineno;
|
$line =~ s/{[a-z]*\d+}/{}/g if !$Opt_Lineno;
|
||||||
if ($verCvt) {
|
if ($verCvt) {
|
||||||
next if $line =~ /^ NETLIST/;
|
next if $line =~ /^ NETLIST/;
|
||||||
$line =~ s!\@dt=0x\(G?/?([^)]+)\)!$1!g; # NEW: @dt -> OLD: non @dt format
|
|
||||||
# # Below Ver1_Non_Dtyped may replace above further
|
|
||||||
if ($line =~ /: ([A-Z]+) /) {
|
if ($line =~ /: ([A-Z]+) /) {
|
||||||
my $type = $1;
|
my $type = $1;
|
||||||
next if $type =~ 'DTYPE';
|
next if $type =~ 'DTYPE';
|
||||||
@@ -150,14 +129,7 @@ sub filter {
|
|||||||
}
|
}
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
if ($Ver1_Non_Dtyped{$type}) {
|
|
||||||
$line =~ s! w[0-9]+!!g;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$line =~ s!\@dt=0$!NoW!g; # NEW: dt=null -> common format
|
|
||||||
$line =~ s!\@dt=0 !NoW !g; # NEW: dt=null -> common format
|
|
||||||
$line =~ s! s?w0$! NoW!g; # OLD: no width -> common format
|
|
||||||
$line =~ s! s?w0 ! NoW !g; # OLD: no width -> common format
|
|
||||||
}
|
}
|
||||||
print $f2 $line;
|
print $f2 $line;
|
||||||
}
|
}
|
||||||
@@ -236,9 +208,12 @@ Do not show differences in line numbering.
|
|||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2005-2019 by Wilson Snyder. This package is free software; you can
|
Copyright 2005-2021 by Wilson Snyder. This program is free software; you
|
||||||
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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
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
|
||||||
|
|
||||||
=head1 AUTHORS
|
=head1 AUTHORS
|
||||||
|
|
||||||
@@ -248,6 +223,8 @@ Wilson Snyder <[email protected]>
|
|||||||
|
|
||||||
C<verilator>
|
C<verilator>
|
||||||
|
|
||||||
|
and L<https://verilator.org/verilator_doc.html> for detailed documentation.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
+111
-95
@@ -1,11 +1,9 @@
|
|||||||
: # -*-Mode: perl;-*- use perl, wherever it is
|
#!/usr/bin/env perl
|
||||||
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
||||||
if 0;
|
|
||||||
# See copyright, etc in below POD section.
|
# See copyright, etc in below POD section.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
use strict;
|
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use strict;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use IO::File;
|
use IO::File;
|
||||||
use Pod::Usage;
|
use Pod::Usage;
|
||||||
@@ -62,6 +60,7 @@ sub process {
|
|||||||
my $filename = shift;
|
my $filename = shift;
|
||||||
|
|
||||||
read_data($filename);
|
read_data($filename);
|
||||||
|
read_cpuinfo();
|
||||||
report();
|
report();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +71,7 @@ sub read_data {
|
|||||||
|
|
||||||
%Global = (rdtsc_cycle_time => 0);
|
%Global = (rdtsc_cycle_time => 0);
|
||||||
|
|
||||||
my $fh = IO::File->new ($filename) or die "%Error: $! $filename,";
|
my $fh = IO::File->new("<$filename") or die "%Error: $! $filename,";
|
||||||
while (my $line = $fh->getline) {
|
while (my $line = $fh->getline) {
|
||||||
if ($line =~ m/VLPROF mtask\s(\d+)\sstart\s(\d+)\send\s(\d+)\selapsed\s(\d+)\spredict_time\s(\d+)\scpu\s(\d+)\son thread (\d+)/) {
|
if ($line =~ m/VLPROF mtask\s(\d+)\sstart\s(\d+)\send\s(\d+)\selapsed\s(\d+)\spredict_time\s(\d+)\scpu\s(\d+)\son thread (\d+)/) {
|
||||||
my $mtask = $1;
|
my $mtask = $1;
|
||||||
@@ -115,6 +114,27 @@ sub read_data {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub read_cpuinfo {
|
||||||
|
my $filename = "/proc/cpuinfo";
|
||||||
|
my $fh = IO::File->new("<$filename") or return;
|
||||||
|
my $cpu;
|
||||||
|
while (my $line = $fh->getline) {
|
||||||
|
chomp $line;
|
||||||
|
if ($line =~ m/^processor\s*:\s*(\d+)\s*$/) {
|
||||||
|
$cpu = $1;
|
||||||
|
}
|
||||||
|
if ($cpu && $line =~ m/^([a-z_ ]+)\s*:\s*(.*)$/) {
|
||||||
|
my ($term, $value) = ($1, $2);
|
||||||
|
$term =~ s/\s+$//;
|
||||||
|
$term =~ s/\s+/_/;
|
||||||
|
$value =~ s/\s+$//;
|
||||||
|
$Global{cpuinfo}{$cpu}{$term} = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
sub report {
|
sub report {
|
||||||
print "Verilator Gantt report\n";
|
print "Verilator Gantt report\n";
|
||||||
|
|
||||||
@@ -125,13 +145,13 @@ sub report {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $nthreads = scalar keys %Threads;
|
my $nthreads = scalar keys %Threads;
|
||||||
$Global{cpus}{cpu_time} = {};
|
$Global{cpus} = {};
|
||||||
foreach my $thread (keys %Threads) {
|
foreach my $thread (keys %Threads) {
|
||||||
# Make potentially multiple characters per column
|
# Make potentially multiple characters per column
|
||||||
foreach my $start (keys %{$Threads{$thread}}) {
|
foreach my $start (keys %{$Threads{$thread}}) {
|
||||||
my $cpu = $Threads{$thread}{$start}{cpu};
|
my $cpu = $Threads{$thread}{$start}{cpu};
|
||||||
my $elapsed = $Threads{$thread}{$start}{end} - $start;
|
my $elapsed = $Threads{$thread}{$start}{end} - $start;
|
||||||
$Global{cpus}{cpu_time}{$cpu} += $elapsed;
|
$Global{cpus}{$cpu}{cpu_time} += $elapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,14 +178,15 @@ sub report {
|
|||||||
print "\nAnalysis:\n";
|
print "\nAnalysis:\n";
|
||||||
printf " Total threads = %d\n", $nthreads;
|
printf " Total threads = %d\n", $nthreads;
|
||||||
printf " Total mtasks = %d\n", scalar(keys %Mtasks);
|
printf " Total mtasks = %d\n", scalar(keys %Mtasks);
|
||||||
printf " Total cpus used = %d\n", scalar(keys %{$Global{cpus}});
|
my $ncpus = scalar(keys %{$Global{cpus}});
|
||||||
|
printf " Total cpus used = %d\n", $ncpus;
|
||||||
printf " Total yields = %d\n", $Global{stats}{yields};
|
printf " Total yields = %d\n", $Global{stats}{yields};
|
||||||
printf " Total eval time = %d rdtsc ticks\n", $Global{last_end};
|
printf " Total eval time = %d rdtsc ticks\n", $Global{last_end};
|
||||||
printf " Longest mtask time = %d rdtsc ticks\n", $long_mtask_time;
|
printf " Longest mtask time = %d rdtsc ticks\n", $long_mtask_time;
|
||||||
printf " All-thread mtask time = %d rdtsc ticks\n", $mt_mtask_time;
|
printf " All-thread mtask time = %d rdtsc ticks\n", $mt_mtask_time;
|
||||||
my $long_efficiency = $long_mtask_time/($Global{last_end});
|
my $long_efficiency = $long_mtask_time/($Global{last_end} || 1);
|
||||||
printf " Longest-thread efficiency = %0.1f%%\n", $long_efficiency*100;
|
printf " Longest-thread efficiency = %0.1f%%\n", $long_efficiency*100;
|
||||||
my $mt_efficiency = $mt_mtask_time/($Global{last_end}*$nthreads);
|
my $mt_efficiency = $mt_mtask_time/($Global{last_end}*$nthreads || 1);
|
||||||
printf " All-thread efficiency = %0.1f%%\n", $mt_efficiency*100;
|
printf " All-thread efficiency = %0.1f%%\n", $mt_efficiency*100;
|
||||||
printf " All-thread speedup = %0.1f\n", $mt_efficiency*$nthreads;
|
printf " All-thread speedup = %0.1f\n", $mt_efficiency*$nthreads;
|
||||||
if ($Global{rdtsc_cycle_time} > 0) {
|
if ($Global{rdtsc_cycle_time} > 0) {
|
||||||
@@ -199,17 +220,72 @@ sub report {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print "\nStatistics:\n";
|
print "\nStatistics:\n";
|
||||||
print " min log(p2e) = $min_p2e from mtask $min_mtask (predict $Mtasks{$min_mtask}{predict}, elapsed $Mtasks{$min_mtask}{elapsed})\n";
|
printf " min log(p2e) = %0.3f", $min_p2e;
|
||||||
print " max log(p2e) = $max_p2e from mtask $max_mtask (predict $Mtasks{$max_mtask}{predict}, elapsed $Mtasks{$max_mtask}{elapsed})\n";
|
print " from mtask $min_mtask (predict $Mtasks{$min_mtask}{predict},";
|
||||||
|
print " elapsed $Mtasks{$min_mtask}{elapsed})\n";
|
||||||
|
printf " max log(p2e) = %0.3f", $max_p2e;
|
||||||
|
print " from mtask $max_mtask (predict $Mtasks{$max_mtask}{predict},";
|
||||||
|
print " elapsed $Mtasks{$max_mtask}{elapsed})\n";
|
||||||
|
|
||||||
my $stddev = stddev(\@p2e_ratios);
|
my $stddev = stddev(\@p2e_ratios);
|
||||||
my $mean = mean(\@p2e_ratios);
|
my $mean = mean(\@p2e_ratios);
|
||||||
print " mean = " . ($mean) . "\n";
|
printf " mean = %0.3f\n", $mean;
|
||||||
print " stddev = " . ($stddev) . "\n";
|
printf " stddev = %0.3f\n", $stddev;
|
||||||
print " e ^ stddev = " . exp($stddev). "\n";
|
printf " e ^ stddev = %0.3f\n", exp($stddev);
|
||||||
|
|
||||||
|
report_cpus();
|
||||||
|
|
||||||
|
if ($nthreads > $ncpus) {
|
||||||
|
print "\n";
|
||||||
|
print "%Warning: There were fewer CPUs ($ncpus) then threads ($nthreads).\n";
|
||||||
|
print " : See docs on use of numactl.\n";
|
||||||
|
} else {
|
||||||
|
if ($Global{cpu_socket_cores_warning}) {
|
||||||
|
print "\n";
|
||||||
|
print "%Warning: Multiple threads scheduled on same hyperthreaded core.\n";
|
||||||
|
print " : See docs on use of numactl.\n";
|
||||||
|
}
|
||||||
|
if ($Global{cpu_sockets_warning}) {
|
||||||
|
print "\n";
|
||||||
|
print "%Warning: Threads scheduled on multiple sockets.\n";
|
||||||
|
print " : See docs on use of numactl.\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
print "\n";
|
print "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub report_cpus {
|
||||||
|
print "\nCPUs:\n";
|
||||||
|
# Test - show all cores
|
||||||
|
# for (my $i=0; $i<73; ++$i) { $Global{cpus}{$i} ||= {cpu_time => 0}; }
|
||||||
|
|
||||||
|
$Global{cpu_sockets} ||= {};
|
||||||
|
$Global{cpu_socket_cores} ||= {};
|
||||||
|
|
||||||
|
foreach my $cpu (sort {$a <=> $b} keys %{$Global{cpus}}) {
|
||||||
|
printf " cpu %d: ", $cpu;
|
||||||
|
printf "cpu_time=%d", $Global{cpus}{$cpu}{cpu_time};
|
||||||
|
|
||||||
|
my $socket = $Global{cpuinfo}{$cpu}{physical_id};
|
||||||
|
$Global{cpu_sockets}{$socket}++ if defined $socket;
|
||||||
|
printf " socket=%d", $socket if defined $socket;
|
||||||
|
|
||||||
|
my $core = $Global{cpuinfo}{$cpu}{core_id};
|
||||||
|
$Global{cpu_socket_cores}{$socket."__".$core}++ if defined $socket && defined $core;
|
||||||
|
printf " core=%d", $core if defined $core;
|
||||||
|
|
||||||
|
my $model = $Global{cpuinfo}{$cpu}{model_name};
|
||||||
|
printf " %s", $model if defined $model;
|
||||||
|
print "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$Global{cpu_sockets_warning} = 1
|
||||||
|
if (scalar keys %{$Global{cpu_sockets}} > 1);
|
||||||
|
foreach my $scn (values %{$Global{cpu_socket_cores}}) {
|
||||||
|
$Global{cpu_socket_cores_warning} = 1 if $scn > 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub report_graph {
|
sub report_graph {
|
||||||
my $time_per = $Opt_Time_Per_Char;
|
my $time_per = $Opt_Time_Per_Char;
|
||||||
if ($time_per == 0) {
|
if ($time_per == 0) {
|
||||||
@@ -221,6 +297,7 @@ sub report_graph {
|
|||||||
}
|
}
|
||||||
# One more step so we can fit more labels
|
# One more step so we can fit more labels
|
||||||
$time_per = int($time_per/2);
|
$time_per = int($time_per/2);
|
||||||
|
$time_per ||= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($graph, $conflicts) = _make_graph($time_per);
|
my ($graph, $conflicts) = _make_graph($time_per);
|
||||||
@@ -458,100 +535,39 @@ verilator_gantt - Create Gantt chart of multi-threaded execution
|
|||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
Creates a visual representation to help analyze Verilator multithreaded
|
Verilator_gantt creates a visual representation to help analyze Verilator
|
||||||
simulation performance, by showing when each macro-task starts and ends,
|
multithreaded simulation performance, by showing when each macro-task
|
||||||
and showing when each thread is busy or idle.
|
starts and ends, and showing when each thread is busy or idle.
|
||||||
|
|
||||||
The generated Gantt chart has time on the X-axis. Times shown are to the
|
For documentation see
|
||||||
scale printed, i.e. a certain about of time for each character width. The
|
L<https://verilator.org/guide/latest/exe_verilator_gantt.html>.
|
||||||
Y-axis shows threads, each thread's execution is shown on one line. That
|
|
||||||
line shows "[" at the position in time when it executes.
|
|
||||||
|
|
||||||
Following the "[" is the cpu number the task executed on, followed by zero
|
=head1 ARGUMENT SUMMARY
|
||||||
or more "-" to make the width of the characters match the scaled execution
|
|
||||||
time, followed by a "]". If the scale is too small, the cpu number and
|
|
||||||
mtask number will not be printed. If the scale is very small, a "&"
|
|
||||||
indicates multiple mtasks started at that time position.
|
|
||||||
|
|
||||||
Also creates a value change dump (VCD) format dump file which may be viewed
|
<filename> Filename to read data from, default "profile_threads.dat".
|
||||||
in a waveform viewer (e.g. C<GTKWave>). See below.
|
--help Displays this message and program version and exits.
|
||||||
|
--scale I<n> Number of characters per time step.
|
||||||
=head1 USAGE
|
--no-vcd Do not create a VCD file.
|
||||||
|
--vcd <filename> Set output filename for vcd dump, default "verilator_gantt.vcd."
|
||||||
Build with --prof-threads.
|
|
||||||
|
|
||||||
Run a sim with +verilator+prof+threads+window 2.
|
|
||||||
|
|
||||||
This will create profile_threads.dat.
|
|
||||||
|
|
||||||
Then run:
|
|
||||||
|
|
||||||
verilator_gantt profile_threads.dat
|
|
||||||
|
|
||||||
The report will be printed on standard output, this also generates
|
|
||||||
profile_threads.vcd
|
|
||||||
|
|
||||||
View profile_threads.vcd in a waveform viewer.
|
|
||||||
|
|
||||||
=head1 VCD SIGNALS
|
|
||||||
|
|
||||||
In waveforms there are the following signals. Most signals the "decimal"
|
|
||||||
format will remove the leading zeros and make the traces easier to read.
|
|
||||||
|
|
||||||
parallelism: The number of mtasks active at this time, for best performance
|
|
||||||
this will match the thread count. You may want to use an "analog step"
|
|
||||||
format to view this signal.
|
|
||||||
|
|
||||||
cpu#_thread: For the given CPU number, the thread number executing.
|
|
||||||
|
|
||||||
mtask#_cpu; For the given mtask id, the CPU it is executing on.
|
|
||||||
|
|
||||||
thread#_mtask: For the given thread number, the mtask id executing.
|
|
||||||
|
|
||||||
=head1 ARGUMENTS
|
|
||||||
|
|
||||||
=over 4
|
|
||||||
|
|
||||||
=item I<filename>
|
|
||||||
|
|
||||||
The filename to read data from, defaults to "profile_threads.dat".
|
|
||||||
|
|
||||||
=item --help
|
|
||||||
|
|
||||||
Displays this message and program version and exits.
|
|
||||||
|
|
||||||
=item --scale I<n>
|
|
||||||
|
|
||||||
On the X-axis of the generated Gantt chart, each character represents this
|
|
||||||
many time units. (On x86, time units are rdtsc ticks.) Defaults to 0,
|
|
||||||
which will automatically compute a reasonable scale where no two mtasks
|
|
||||||
need to fit into same character width's worth of scaled time.
|
|
||||||
|
|
||||||
=item --no-vcd
|
|
||||||
|
|
||||||
=item --vcd I<filename>
|
|
||||||
|
|
||||||
Set output filename for vcd dump, or disable. Default is
|
|
||||||
verilator_gantt.vcd.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2018-2019 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2018-2021 by Wilson Snyder. This program is free software; you
|
||||||
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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
Version 2.0.
|
||||||
|
|
||||||
=head1 AUTHORS
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Wilson Snyder <[email protected]>
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
C<verilator>
|
C<verilator>
|
||||||
|
|
||||||
|
and L<https://verilator.org/guide/latest/exe_verilator_gantt.html> for
|
||||||
|
detailed documentation.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
: # -*-Mode: perl;-*- use perl, wherever it is
|
#!/usr/bin/env perl
|
||||||
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
||||||
if 0;
|
|
||||||
# DESCRIPTION: Print include statements for each ARGV
|
# DESCRIPTION: Print include statements for each ARGV
|
||||||
#
|
#
|
||||||
# Copyright 2003-2019 by Wilson Snyder. This package is free software; you can
|
# Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
||||||
# 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
|
||||||
# General Public License Version 3 or the Perl Artistic License Version 2.0.
|
# 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
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
require 5.005;
|
require 5.005;
|
||||||
|
|||||||
+15
-17
@@ -1,6 +1,4 @@
|
|||||||
: # -*-Mode: perl;-*- use perl, wherever it is
|
#!/usr/bin/env perl
|
||||||
eval 'exec perl -wS $0 ${1+"$@"}'
|
|
||||||
if 0;
|
|
||||||
# See copyright, etc in below POD section.
|
# See copyright, etc in below POD section.
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
@@ -204,7 +202,7 @@ verilator_profcfunc - Read gprof report created with --prof-cfuncs
|
|||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
|
||||||
verilator --prof-cfuncs ....
|
verilator --prof-cfuncs ....
|
||||||
gcc --ggdb -pg ....
|
gcc ....
|
||||||
{run executable}
|
{run executable}
|
||||||
gprof
|
gprof
|
||||||
verilator_profcfuncs gprof.out
|
verilator_profcfuncs gprof.out
|
||||||
@@ -216,32 +214,32 @@ the functions are then transformed, assuming the user used Verilator's
|
|||||||
--prof-cfuncs, and a report printed showing the percentage of time, etc,
|
--prof-cfuncs, and a report printed showing the percentage of time, etc,
|
||||||
in each Verilog block.
|
in each Verilog block.
|
||||||
|
|
||||||
=head1 ARGUMENTS
|
For documentation see
|
||||||
|
L<https://verilator.org/guide/latest/exe_verilator_profcfuncs.html>.
|
||||||
|
|
||||||
=over 4
|
=head1 ARGUMENT SUMMARY
|
||||||
|
|
||||||
=item --help
|
<filename> Input file (gprof.out)
|
||||||
|
--help Display this help
|
||||||
Displays this message and program version and exits.
|
|
||||||
|
|
||||||
=back
|
|
||||||
|
|
||||||
=head1 DISTRIBUTION
|
=head1 DISTRIBUTION
|
||||||
|
|
||||||
The latest version is available from L<https://verilator.org>.
|
The latest version is available from L<https://verilator.org>.
|
||||||
|
|
||||||
Copyright 2007-2019 by Wilson Snyder. Verilator is free software; you can
|
Copyright 2007-2021 by Wilson Snyder. This program is free software; you
|
||||||
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
|
||||||
General Public License Version 3 or the Perl Artistic License Version 2.0.
|
Lesser General Public License Version 3 or the Perl Artistic License
|
||||||
|
Version 2.0.
|
||||||
|
|
||||||
=head1 AUTHORS
|
SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
Wilson Snyder <[email protected]>
|
|
||||||
|
|
||||||
=head1 SEE ALSO
|
=head1 SEE ALSO
|
||||||
|
|
||||||
C<verilator>
|
C<verilator>
|
||||||
|
|
||||||
|
and L<https://verilator.org/guide/latest/exe_verilator_profcfuncs.html> for
|
||||||
|
detailed documentation.
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# DESCRIPTION: Verilator: Travis CI build script
|
|
||||||
#
|
|
||||||
# Copyright 2019 by Todd Strader. 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.
|
|
||||||
#
|
|
||||||
# This script builds and caches the Verilator binaries for Travis CI
|
|
||||||
# (and possibly other CI platforms). The Verilator CI system uses this
|
|
||||||
# script, but other CI systems that depend on Verilator may also use
|
|
||||||
# the script.
|
|
||||||
# see: https://github.com/verilator/verilator_ext_tests/blob/master/.travis.yml
|
|
||||||
# To use this script, either checkout Verilator as part of the CI build
|
|
||||||
# process or add Verilator as a Git submodule. Verilator tarballs can
|
|
||||||
# not be used as the script relies on Git revisions for caching.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ -z "${VERILATOR_NUM_JOBS}" ]; then
|
|
||||||
VERILATOR_NUM_JOBS=$(nproc)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Caching would be simpler if we installed without VERILATOR_ROOT, but
|
|
||||||
# it's needed for driver.pl outside of the repo
|
|
||||||
if [ -z "${VERILATOR_ROOT}" ]; then
|
|
||||||
echo "VERILATOR_ROOT not set"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${VERILATOR_CACHE}" ]; then
|
|
||||||
echo "VERILATOR_CACHE not set"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
VERILATOR_REV=$(cd "${VERILATOR_ROOT}" && git rev-parse HEAD)
|
|
||||||
echo "Found Verilator rev ${VERILATOR_REV}"
|
|
||||||
|
|
||||||
CACHED_REV_FILE=${VERILATOR_CACHE}/.rev.txt
|
|
||||||
|
|
||||||
if [[ ! -f "${CACHED_REV_FILE}" || \
|
|
||||||
$(< "${CACHED_REV_FILE}") != "${VERILATOR_REV}" ]]; then
|
|
||||||
echo "Building Verilator"
|
|
||||||
|
|
||||||
# Unsure why Travis monkies with the capitalization of the stage name, but it does
|
|
||||||
if [[ -n ${TRAVIS_BUILD_STAGE_NAME} && \
|
|
||||||
${TRAVIS_BUILD_STAGE_NAME} != "Build verilator" ]]; then
|
|
||||||
echo "WARNING: Building Verilator in Travis build stage other than \"Build verilator\": ${TRAVIS_BUILD_STAGE_NAME}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${VERILATOR_ROOT}"
|
|
||||||
autoconf && ./configure ${VERILATOR_CONFIG_FLAGS} && make -j ${VERILATOR_NUM_JOBS}
|
|
||||||
# Copy the Verilator build artifacts
|
|
||||||
mkdir -p "${VERILATOR_CACHE}"
|
|
||||||
rm -rf ${VERILATOR_CACHE}/*
|
|
||||||
cp bin/*bin* "${VERILATOR_CACHE}"
|
|
||||||
# Remember the Git revision
|
|
||||||
echo "${VERILATOR_REV}" > "${CACHED_REV_FILE}"
|
|
||||||
else
|
|
||||||
echo "Using cached Verilator"
|
|
||||||
cd "${VERILATOR_ROOT}"
|
|
||||||
# Create include/verilated_config.h and maybe other things
|
|
||||||
autoconf && ./configure ${VERILATOR_CONFIG_FLAGS}
|
|
||||||
cp ${VERILATOR_CACHE}/* bin
|
|
||||||
fi
|
|
||||||
Executable
+29
@@ -0,0 +1,29 @@
|
|||||||
|
#!/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
|
||||||
|
ccache -s -z
|
||||||
Executable
+114
@@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# DESCRIPTION: Verilator: CI dependency install script
|
||||||
|
#
|
||||||
|
# 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 runs in the 'install' phase of all jobs, in all stages. We try to
|
||||||
|
# minimize the time spent in this by selectively installing only the components
|
||||||
|
# required by the particular build stage.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
cd $(dirname "$0")/..
|
||||||
|
|
||||||
|
fatal() {
|
||||||
|
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$CI_M32" = "0" ]; then
|
||||||
|
unset CI_M32
|
||||||
|
elif [ "$CI_M32" != "1" ]; then
|
||||||
|
fatal "\$CI_M32 must be '0' or '1'";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||||
|
MAKE=make
|
||||||
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
MAKE=make
|
||||||
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
|
MAKE=gmake
|
||||||
|
else
|
||||||
|
fatal "Unknown os: '$CI_OS_NAME'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
install-vcddiff() {
|
||||||
|
TMP_DIR="$(mktemp -d)"
|
||||||
|
git clone https://github.com/veripool/vcddiff "$TMP_DIR"
|
||||||
|
git -C "${TMP_DIR}" checkout e5664be5fe39d353bf3fcb50aa05214ab7ed4ac4
|
||||||
|
"$MAKE" -C "${TMP_DIR}"
|
||||||
|
sudo cp "${TMP_DIR}/vcddiff" /usr/local/bin
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||||
|
##############################################################################
|
||||||
|
# Dependencies of jobs in the 'build' stage, i.e.: packages required to
|
||||||
|
# build Verilator
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install libfl-dev libgoogle-perftools-dev ccache
|
||||||
|
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ]; then
|
||||||
|
sudo apt-get install libsystemc libsystemc-dev
|
||||||
|
fi
|
||||||
|
if [ "$COVERAGE" = 1 ]; then
|
||||||
|
yes yes | sudo cpan -fi Parallel::Forker
|
||||||
|
fi
|
||||||
|
if [ "$CI_M32" = 1 ]; then
|
||||||
|
sudo apt-get install gcc-multilib g++-multilib
|
||||||
|
fi
|
||||||
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
brew update
|
||||||
|
brew install ccache perl gperftools
|
||||||
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
|
sudo pkg install -y autoconf bison ccache gmake perl5
|
||||||
|
else
|
||||||
|
fatal "Unknown os: '$CI_OS_NAME'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$CCACHE_DIR" ]; then
|
||||||
|
mkdir -p "$CCACHE_DIR" && ./ci/ci-ccache-maint.bash
|
||||||
|
fi
|
||||||
|
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||||
|
##############################################################################
|
||||||
|
# Dependencies of jobs in the 'test' stage, i.e.: packages required to
|
||||||
|
# run the tests
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||||
|
sudo apt-get update
|
||||||
|
# libfl-dev needed for internal coverage's test runs
|
||||||
|
sudo apt-get install gdb gtkwave lcov libfl-dev ccache
|
||||||
|
if [ "$CI_RUNS_ON" = "ubuntu-20.04" ]; then
|
||||||
|
sudo apt-get install libsystemc-dev
|
||||||
|
fi
|
||||||
|
if [ "$CI_M32" = 1 ]; then
|
||||||
|
sudo apt-get install lib32z1-dev gcc-multilib g++-multilib
|
||||||
|
fi
|
||||||
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
brew update
|
||||||
|
# brew cask install gtkwave # fst2vcd hangs at launch, so don't bother
|
||||||
|
brew install ccache perl
|
||||||
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
|
# fst2vcd fails with "Could not open '<input file>', exiting."
|
||||||
|
sudo pkg install -y ccache gmake perl5 python3
|
||||||
|
else
|
||||||
|
fatal "Unknown os: '$CI_OS_NAME'"
|
||||||
|
fi
|
||||||
|
# Common installs
|
||||||
|
if [ "$CI_RUNS_ON" != "ubuntu-14.04" ]; then
|
||||||
|
CI_CPAN_REPO=https://cpan.org
|
||||||
|
fi
|
||||||
|
yes yes | sudo cpan -M $CI_CPAN_REPO -fi Parallel::Forker
|
||||||
|
install-vcddiff
|
||||||
|
else
|
||||||
|
##############################################################################
|
||||||
|
# Unknown build stage
|
||||||
|
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
|
||||||
|
fi
|
||||||
Executable
+193
@@ -0,0 +1,193 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# DESCRIPTION: Verilator: CI main job script
|
||||||
|
#
|
||||||
|
# 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 is the main script executed in the 'script' phase by all jobs. We use a
|
||||||
|
# single script to keep the CI setting simple. We pass job parameters via
|
||||||
|
# environment variables using 'env' keys.
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
set -e
|
||||||
|
set -x
|
||||||
|
|
||||||
|
fatal() {
|
||||||
|
echo "ERROR: $(basename "$0"): $1" >&2; exit 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$CI_M32" = "0" ]; then
|
||||||
|
unset CI_M32
|
||||||
|
elif [ "$CI_M32" != "1" ]; then
|
||||||
|
fatal "\$CI_M32 must be '0' or '1'";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "linux" ]; then
|
||||||
|
export MAKE=make
|
||||||
|
NPROC=$(nproc)
|
||||||
|
elif [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
export MAKE=make
|
||||||
|
NPROC=$(sysctl -n hw.logicalcpu)
|
||||||
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
|
export MAKE=gmake
|
||||||
|
NPROC=$(sysctl -n hw.ncpu)
|
||||||
|
else
|
||||||
|
fatal "Unknown os: '$CI_OS_NAME'"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CI_BUILD_STAGE_NAME" = "build" ]; then
|
||||||
|
##############################################################################
|
||||||
|
# Build verilator
|
||||||
|
|
||||||
|
if [ "$COVERAGE" != 1 ]; then
|
||||||
|
autoconf
|
||||||
|
./configure --enable-longtests --enable-ccwarn ${CI_M32:+--enable-m32}
|
||||||
|
ccache -z
|
||||||
|
"$MAKE" -j "$NPROC" -k
|
||||||
|
ccache -s
|
||||||
|
if [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
file bin/verilator_bin
|
||||||
|
file bin/verilator_bin_dbg
|
||||||
|
md5 bin/verilator_bin
|
||||||
|
md5 bin/verilator_bin_dbg
|
||||||
|
stat bin/verilator_bin
|
||||||
|
stat bin/verilator_bin_dbg
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
nodist/code_coverage --stages 0-2
|
||||||
|
fi
|
||||||
|
elif [ "$CI_BUILD_STAGE_NAME" = "test" ]; then
|
||||||
|
##############################################################################
|
||||||
|
# Run tests
|
||||||
|
|
||||||
|
export VERILATOR_TEST_NO_CONTRIBUTORS=1 # Separate workflow check
|
||||||
|
|
||||||
|
if [ "$CI_OS_NAME" = "osx" ]; then
|
||||||
|
export VERILATOR_TEST_NO_GDB=1 # Pain to get GDB to work on OS X
|
||||||
|
# TODO below may no longer be requried as configure checks for -pg
|
||||||
|
export VERILATOR_TEST_NO_GPROF=1 # Apple Clang has no -pg
|
||||||
|
# export PATH="/Applications/gtkwave.app/Contents/Resources/bin:$PATH" # fst2vcd
|
||||||
|
file bin/verilator_bin
|
||||||
|
file bin/verilator_bin_dbg
|
||||||
|
md5 bin/verilator_bin
|
||||||
|
md5 bin/verilator_bin_dbg
|
||||||
|
stat bin/verilator_bin
|
||||||
|
stat bin/verilator_bin_dbg
|
||||||
|
# For some reason, the dbg exe is corrupted by this point ('file' reports
|
||||||
|
# it as data rather than a Mach-O). Unclear if this is an OS X issue or
|
||||||
|
# CI's. Remove the file and re-link...
|
||||||
|
rm bin/verilator_bin_dbg
|
||||||
|
"$MAKE" -j "$NPROC" -k
|
||||||
|
elif [ "$CI_OS_NAME" = "freebsd" ]; then
|
||||||
|
export VERILATOR_TEST_NO_GDB=1 # Disable for now, ideally should run
|
||||||
|
# TODO below may no longer be requried as configure checks for -pg
|
||||||
|
export VERILATOR_TEST_NO_GPROF=1 # gprof is a bit different on FreeBSD, disable
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run sanitize on Ubuntu 20.04 only
|
||||||
|
[ "$CI_RUNS_ON" = 'ubuntu-20.04' ] && [ "$CI_M32" = "" ] && sanitize='--sanitize' || sanitize=''
|
||||||
|
|
||||||
|
# Run the specified test
|
||||||
|
ccache -z
|
||||||
|
case $TESTS in
|
||||||
|
dist-vlt-0)
|
||||||
|
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=0/3
|
||||||
|
;;
|
||||||
|
dist-vlt-1)
|
||||||
|
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=1/3
|
||||||
|
;;
|
||||||
|
dist-vlt-2)
|
||||||
|
"$MAKE" -C test_regress SCENARIOS="--dist --vlt $sanitize" DRIVER_HASHSET=--hashset=2/3
|
||||||
|
;;
|
||||||
|
vltmt-0)
|
||||||
|
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=0/2
|
||||||
|
;;
|
||||||
|
vltmt-1)
|
||||||
|
"$MAKE" -C test_regress SCENARIOS=--vltmt DRIVER_HASHSET=--hashset=1/2
|
||||||
|
;;
|
||||||
|
coverage-all)
|
||||||
|
nodist/code_coverage --stages 1-
|
||||||
|
;;
|
||||||
|
coverage-dist)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--dist
|
||||||
|
;;
|
||||||
|
coverage-vlt-0)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=0/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-1)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=1/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-2)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=2/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-3)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=3/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-4)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=4/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-5)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=5/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-6)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=6/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-7)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=7/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-8)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=8/10
|
||||||
|
;;
|
||||||
|
coverage-vlt-9)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vlt --hashset=9/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-0)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=0/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-1)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=1/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-2)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=2/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-3)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=3/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-4)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=4/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-5)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=5/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-6)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=6/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-7)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=7/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-8)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=8/10
|
||||||
|
;;
|
||||||
|
coverage-vltmt-9)
|
||||||
|
nodist/code_coverage --stages 1- --scenarios=--vltmt --hashset=9/10
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
fatal "Unknown test: $TESTS"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
ccache -s
|
||||||
|
|
||||||
|
# Upload coverage data
|
||||||
|
if [[ $TESTS == coverage-* ]]; then
|
||||||
|
bash <(cat ci/coverage-upload.sh) -f nodist/obj_dir/coverage/app_total.info
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
##############################################################################
|
||||||
|
# Unknown build stage
|
||||||
|
fatal "Unknown build stage: '$CI_BUILD_STAGE_NAME'"
|
||||||
|
fi
|
||||||
Executable
+1884
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,56 @@
|
|||||||
|
# DESCRIPTION: Dockerfile for env to build and fully test Verilator
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
apt-get install --no-install-recommends -y \
|
||||||
|
autoconf \
|
||||||
|
bc \
|
||||||
|
bison \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
ccache \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
flex \
|
||||||
|
gdb \
|
||||||
|
git \
|
||||||
|
gtkwave \
|
||||||
|
libfl2 \
|
||||||
|
libfl-dev \
|
||||||
|
libgoogle-perftools-dev \
|
||||||
|
libsystemc \
|
||||||
|
libsystemc-dev \
|
||||||
|
numactl \
|
||||||
|
perl \
|
||||||
|
python3 \
|
||||||
|
wget \
|
||||||
|
zlibc \
|
||||||
|
zlib1g \
|
||||||
|
zlib1g-dev \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
RUN cpan install -fi Parallel::Forker
|
||||||
|
|
||||||
|
RUN git clone https://github.com/veripool/vcddiff.git && \
|
||||||
|
make -C vcddiff && \
|
||||||
|
cp -p vcddiff/vcddiff /usr/local/bin/vcddiff && \
|
||||||
|
rm -rf vcddiff
|
||||||
|
|
||||||
|
COPY build.sh /tmp/build.sh
|
||||||
|
|
||||||
|
ENV VERILATOR_AUTHOR_SITE=1
|
||||||
|
|
||||||
|
WORKDIR /work
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/tmp/build.sh" ]
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
Verilator Build Docker Container
|
||||||
|
================================
|
||||||
|
|
||||||
|
This Verilator Build Docker Container is set up to compile and test a
|
||||||
|
Verilator build. It uses the following parameters:
|
||||||
|
|
||||||
|
- Source repository (default: https://github.com/verilator/verilator)
|
||||||
|
|
||||||
|
- Source revision (default: master)
|
||||||
|
|
||||||
|
- Compiler (GCC 9.3.0, clang 10.0.0, default: 9.3.0)
|
||||||
|
|
||||||
|
The container is published as ``verilator/verilator-buildenv`` on `docker
|
||||||
|
hub
|
||||||
|
<https://hub.docker.com/repository/docker/verilator/verilator-buildenv>`__.
|
||||||
|
|
||||||
|
To run the basic build using the current Verilator master:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti verilator/verilator-buildenv
|
||||||
|
|
||||||
|
To also run tests:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti verilator/verilator-buildenv test
|
||||||
|
|
||||||
|
To change the compiler:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti -e CC=clang-10 -e CXX=clang++-10 verilator/verilator-buildenv test
|
||||||
|
|
||||||
|
The tests that involve gdb are not working due to security restrictions.
|
||||||
|
To run those too:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti -e CC=clang-10 -e CXX=clang++-10 --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
||||||
|
|
||||||
|
Rather then building using a remote git repository you may prefer to use a
|
||||||
|
working copy on the local filesystem. Mount the local working copy path as
|
||||||
|
a volume and use that in place of git. When doing this be careful to have
|
||||||
|
all changes committed to the local git area. To build the current HEAD from
|
||||||
|
top of a repository:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti -v ${PWD}:/tmp/repo -e REPO=/tmp/repo -e REV=`git rev-parse --short HEAD` --cap-add=SYS_PTRACE --security-opt seccomp=unconfined verilator/verilator-buildenv test
|
||||||
|
|
||||||
|
|
||||||
|
Rebuilding
|
||||||
|
----------
|
||||||
|
|
||||||
|
To rebuild the Verilator-buildenv docker image, run:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker build .
|
||||||
|
|
||||||
|
This will also build SystemC under all supported compiler variants to
|
||||||
|
reduce the SystemC testing time.
|
||||||
Executable
+25
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash -e
|
||||||
|
# DESCRIPTION: Build Verilator (inside container)
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
: "${REPO:=https://github.com/verilator/verilator}"
|
||||||
|
: "${REV:=master}"
|
||||||
|
: "${CC:=gcc}"
|
||||||
|
: "${CXX:=g++}"
|
||||||
|
|
||||||
|
SRCS=$PWD/verilator
|
||||||
|
|
||||||
|
git clone "$REPO" "$SRCS"
|
||||||
|
cd "$SRCS"
|
||||||
|
git checkout "$REV"
|
||||||
|
autoconf
|
||||||
|
./configure --enable-longtests
|
||||||
|
make -j $(nproc)
|
||||||
|
if [ "${1:-''}" == "test" ]; then
|
||||||
|
make test
|
||||||
|
fi
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
# DESCRIPTION: Dockerfile for image to run Verilator inside
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive \
|
||||||
|
&& apt-get install --no-install-recommends -y \
|
||||||
|
autoconf \
|
||||||
|
bc \
|
||||||
|
bison \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
ccache \
|
||||||
|
flex \
|
||||||
|
git \
|
||||||
|
libfl-dev \
|
||||||
|
libgoogle-perftools-dev \
|
||||||
|
perl \
|
||||||
|
python3 \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
ARG REPO=https://github.com/verilator/verilator
|
||||||
|
ARG SOURCE_COMMIT=master
|
||||||
|
|
||||||
|
WORKDIR /tmp
|
||||||
|
|
||||||
|
# Add an exception for the linter, we want to cd here in one layer
|
||||||
|
# to reduce the number of layers (and thereby size).
|
||||||
|
# hadolint ignore=DL3003
|
||||||
|
RUN git clone "${REPO}" verilator && \
|
||||||
|
cd verilator && \
|
||||||
|
git checkout "${SOURCE_COMMIT}" && \
|
||||||
|
autoconf && \
|
||||||
|
./configure && \
|
||||||
|
make -j "$(nproc)" && \
|
||||||
|
make install && \
|
||||||
|
cd .. && \
|
||||||
|
rm -r verilator
|
||||||
|
|
||||||
|
COPY verilator-wrap.sh /usr/local/bin/verilator-wrap.sh
|
||||||
|
|
||||||
|
WORKDIR /work
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/usr/local/bin/verilator-wrap.sh" ]
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
Verilator Executable Docker Container
|
||||||
|
=====================================
|
||||||
|
|
||||||
|
The Verilator Executable Docker Container allows you to run Verilator
|
||||||
|
easily as a docker image, e.g.:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti verilator/verilator:latest --version
|
||||||
|
|
||||||
|
This will install the container, run the latest Verilator and print
|
||||||
|
Verilator's version.
|
||||||
|
|
||||||
|
Containers are automatically built for all released versions, so you may
|
||||||
|
easily compare results across versions, e.g.:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti verilator/verilator:4.030 --version
|
||||||
|
|
||||||
|
Verilator needs to read and write files on the local system. To simplify
|
||||||
|
this process, use the ``verilator-docker`` convenience script. This script
|
||||||
|
takes the version number, and all remaining arguments are passed through to
|
||||||
|
Verilator. e.g.:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
./verilator-docker 4.030 --version
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
./verilator-docker 4.030 --cc test.v
|
||||||
|
|
||||||
|
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
|
||||||
|
to Verilate test.v:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:latest --cc test.v
|
||||||
|
|
||||||
|
This method can only access files below the current directory. An
|
||||||
|
alternative is setup the volume ``-workdir``.
|
||||||
|
|
||||||
|
You can also work in the container by setting the entrypoint (don't forget
|
||||||
|
to mount a volume if you want your work persistent):
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker run -ti --entrypoint /bin/bash verilator/verilator:latest
|
||||||
|
|
||||||
|
You can also use the container to build Verilator at a specific commit:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
docker build --build-arg SOURCE_COMMIT=<commit> .
|
||||||
|
|
||||||
|
|
||||||
|
Internals
|
||||||
|
---------
|
||||||
|
|
||||||
|
The Dockerfile builds Verilator and removes the tree when completed to
|
||||||
|
reduce the image size. The entrypoint is set as a wrapper script
|
||||||
|
(``verilator-wrap.sh``). That script 1. calls Verilator, and 2. copies the
|
||||||
|
Verilated runtime files to the ``obj_dir`` or the ``-Mdir``
|
||||||
|
respectively. This allows the user to have the files to they may later
|
||||||
|
build the C++ output with the matching runtime files. The wrapper also
|
||||||
|
patches the Verilated Makefile accordingly.
|
||||||
|
|
||||||
|
There is also a hook defined that is run by docker hub via automated
|
||||||
|
builds.
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# DESCRIPTION: Docker hub hook to pass SOURCE_COMMIT
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
docker build --build-arg SOURCE_COMMIT=${SOURCE_COMMIT} -f $DOCKERFILE_PATH -t $IMAGE_NAME .
|
||||||
Executable
+13
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# DESCRIPTION: Docker hub hook to tag the latest release (stable)
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
if [ "$SOURCE_BRANCH"="stable" ]; then
|
||||||
|
docker tag $IMAGE_NAME $DOCKER_REPO:latest
|
||||||
|
docker push $DOCKER_REPO:latest
|
||||||
|
fi
|
||||||
Executable
+11
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# DESCRIPTION: Wrap a verilator call to run a docker container
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
docker pull verilator/verilator:$1 >/dev/null
|
||||||
|
docker run -ti -v ${PWD}:/work --user $(id -u):$(id -g) verilator/verilator:$1 "${@:2}"
|
||||||
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# DESCRIPTION: Wrap a Verilator call and copy vlt includes
|
||||||
|
# (inside docker container)
|
||||||
|
#
|
||||||
|
# Copyright 2020 by Stefan Wallentowitz. 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
|
||||||
|
|
||||||
|
perl /usr/local/bin/verilator "$@"
|
||||||
|
status=$?
|
||||||
|
if [ $status -ne 0 ]; then
|
||||||
|
exit $status
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check if user set an obj_dir
|
||||||
|
obj_dir=$(echo " $@" | grep -oP '\s--Mdir\s*\K\S+')
|
||||||
|
if [ "$obj_dir" == "" ]; then
|
||||||
|
obj_dir="obj_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If the run was successful: Copy required files to allow build without this container
|
||||||
|
if [ -e ${obj_dir} ]; then
|
||||||
|
# Copy files required for the build
|
||||||
|
mkdir -p ${obj_dir}/vlt
|
||||||
|
cp -r /usr/local/share/verilator/bin ${obj_dir}/vlt
|
||||||
|
cp -r /usr/local/share/verilator/include ${obj_dir}/vlt
|
||||||
|
# Point Makefile to that folder
|
||||||
|
sed -i 's/VERILATOR_ROOT = \/usr\/local\/share\/verilator/VERILATOR_ROOT = vlt/g' ${obj_dir}/*.mk
|
||||||
|
fi
|
||||||
-26
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# DESCRIPTION: Verilator: Travis CI test script
|
|
||||||
#
|
|
||||||
# Copyright 2019 by Todd Strader. 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.
|
|
||||||
set -e
|
|
||||||
|
|
||||||
export DRIVER_FLAGS='-j 0 --quiet --rerun'
|
|
||||||
|
|
||||||
case $1 in
|
|
||||||
dist)
|
|
||||||
make -C test_regress SCENARIOS=--dist
|
|
||||||
;;
|
|
||||||
vlt)
|
|
||||||
make -C test_regress SCENARIOS=--vlt
|
|
||||||
;;
|
|
||||||
vltmt)
|
|
||||||
make -C test_regress SCENARIOS=--vltmt
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: test.sh (dist|vlt|vltmt)"
|
|
||||||
exit -1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
# DESCRIPTION: codecov.io config
|
||||||
|
#
|
||||||
|
# Copyright 2020-2021 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: no
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
precision: 2
|
||||||
|
round: down
|
||||||
|
range: "50...100"
|
||||||
|
ignore:
|
||||||
|
- "ci"
|
||||||
|
- "docs"
|
||||||
|
- "examples"
|
||||||
|
- "include/gtkwave"
|
||||||
|
- "include/vltstd"
|
||||||
|
- "test_regress"
|
||||||
|
|
||||||
|
parsers:
|
||||||
|
gcov:
|
||||||
|
branch_detection:
|
||||||
|
conditional: yes
|
||||||
|
loop: yes
|
||||||
|
method: no
|
||||||
|
macro: no
|
||||||
|
|
||||||
|
comment:
|
||||||
|
layout: "reach,diff,flags,tree"
|
||||||
|
behavior: default
|
||||||
|
require_changes: yes
|
||||||
+271
-68
@@ -1,21 +1,27 @@
|
|||||||
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
# DESCRIPTION: Process this file with autoconf to produce a configure script.
|
||||||
#
|
#
|
||||||
# Copyright 2003-2019 by Wilson Snyder. Verilator is free software; you can
|
# Copyright 2003-2021 by Wilson Snyder. Verilator is free software; you
|
||||||
# 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
|
||||||
|
|
||||||
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
#AC_INIT([Verilator],[#.### YYYY-MM-DD])
|
||||||
#AC_INIT([Verilator],[#.### devel])
|
#AC_INIT([Verilator],[#.### devel])
|
||||||
AC_INIT([Verilator],[4.024 2019-12-08],
|
AC_INIT([Verilator],[4.210 2021-07-07],
|
||||||
[https://verilator.org],
|
[https://verilator.org],
|
||||||
[verilator],[https://verilator.org])
|
[verilator],[https://verilator.org])
|
||||||
# When releasing, also update header of Changes file
|
# When releasing, also update header of Changes file
|
||||||
# and commit using "devel release" or "Version bump" message
|
# and commit using "devel release" or "Version bump" message
|
||||||
|
# Then 'make maintainer-dist'
|
||||||
|
|
||||||
AC_CONFIG_HEADER(src/config_build.h)
|
AC_CONFIG_HEADER(src/config_build.h)
|
||||||
AC_CONFIG_FILES(Makefile docs/Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h verilator.pc verilator-config.cmake verilator-config-version.cmake)
|
AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h verilator.pc verilator-config.cmake verilator-config-version.cmake)
|
||||||
|
|
||||||
|
# Version
|
||||||
AC_MSG_RESULT([configuring for $PACKAGE_STRING])
|
AC_MSG_RESULT([configuring for $PACKAGE_STRING])
|
||||||
|
PACKAGE_VERSION_NUMBER=`AS_ECHO("$PACKAGE_VERSION") | sed 's/ .*//g'`
|
||||||
|
AC_SUBST(PACKAGE_VERSION_NUMBER)
|
||||||
|
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_NUMBER_STRING],["$PACKAGE_VERSION_NUMBER"],[Package version as a number])
|
||||||
|
|
||||||
# Ignore automake flags passed by Ubuntu builds
|
# Ignore automake flags passed by Ubuntu builds
|
||||||
AC_ARG_ENABLE([dependency-tracking],
|
AC_ARG_ENABLE([dependency-tracking],
|
||||||
@@ -25,11 +31,71 @@ AC_ARG_ENABLE([maintainer-mode],
|
|||||||
AC_ARG_ENABLE([silent-rules],
|
AC_ARG_ENABLE([silent-rules],
|
||||||
[AS_HELP_STRING([--disable-silent-rules], [ignored])])
|
[AS_HELP_STRING([--disable-silent-rules], [ignored])])
|
||||||
|
|
||||||
|
# Flag to enable linking specific libraries statically
|
||||||
|
AC_MSG_CHECKING(whether to perform partial static linking of Verilator binary)
|
||||||
|
AC_ARG_ENABLE([partial-static],
|
||||||
|
[AS_HELP_STRING([--disable-partial-static],
|
||||||
|
[By default, for Verilation performance, Verilator
|
||||||
|
is linked against some of its dependencies
|
||||||
|
statically. Use this to link the Verilator binary
|
||||||
|
fully dynamically.])],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) CFG_ENABLE_PARTIAL_STATIC=yes ;;
|
||||||
|
no) CFG_ENABLE_PARTIAL_STATIC=no ;;
|
||||||
|
*) AC_MSG_ERROR([bad value '${enableval}' for --disable-partial-static]) ;;
|
||||||
|
esac],
|
||||||
|
CFG_ENABLE_PARTIAL_STATIC=yes)
|
||||||
|
AC_MSG_RESULT($CFG_ENABLE_PARTIAL_STATIC)
|
||||||
|
|
||||||
|
# Flag to enable linking Verilator with tcmalloc if available
|
||||||
|
AC_MSG_CHECKING(whether to use tcmalloc)
|
||||||
|
AC_ARG_ENABLE([tcmalloc],
|
||||||
|
[AS_HELP_STRING([--enable-tcmalloc],
|
||||||
|
[Use libtcmalloc_minimal for faster dynamic memory
|
||||||
|
management in Verilator binary @<:@default=check@:>@])],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) CFG_WITH_TCMALLOC=yes ;;
|
||||||
|
no) CFG_WITH_TCMALLOC=no ;;
|
||||||
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-tcmalloc]) ;;
|
||||||
|
esac],
|
||||||
|
[CFG_WITH_TCMALLOC=check;])
|
||||||
|
AC_MSG_RESULT($CFG_WITH_TCMALLOC)
|
||||||
|
|
||||||
|
# Flag to enable -m32 build
|
||||||
|
AC_MSG_CHECKING(whether to use -m32)
|
||||||
|
AC_ARG_ENABLE([m32],
|
||||||
|
[AS_HELP_STRING([--enable-m32],
|
||||||
|
[Use -m32 for all compilation and link,
|
||||||
|
including Verialtor and generated models.])],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) CFG_ENABLE_M32=yes ;;
|
||||||
|
no) CFG_ENABLE_M32=no ;;
|
||||||
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-m32]) ;;
|
||||||
|
esac],
|
||||||
|
CFG_ENABLE_M32=no)
|
||||||
|
AC_MSG_RESULT($CFG_ENABLE_M32)
|
||||||
|
|
||||||
|
# Flag to enable coverage build
|
||||||
|
AC_MSG_CHECKING(whether to build for coverage collection)
|
||||||
|
AC_ARG_ENABLE([coverage],
|
||||||
|
[AS_HELP_STRING([--enable-coverage],
|
||||||
|
[Build Verilator for code coverage collection.
|
||||||
|
For developers only.])],
|
||||||
|
[case "${enableval}" in
|
||||||
|
yes) CFG_ENABLE_COVERAGE=yes ;;
|
||||||
|
no) CFG_ENABLE_COVERAGE=no ;;
|
||||||
|
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-coverage]) ;;
|
||||||
|
esac],
|
||||||
|
CFG_ENABLE_COVERAGE=no)
|
||||||
|
AC_MSG_RESULT($CFG_ENABLE_COVERAGE)
|
||||||
|
|
||||||
# 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)
|
||||||
AC_ARG_ENABLE([defenv],
|
AC_ARG_ENABLE([defenv],
|
||||||
[AS_HELP_STRING([--disable-defenv],
|
[AS_HELP_STRING([--disable-defenv],
|
||||||
[disable using some hardcoded data paths extracted from some default environment variables (the default is to use hardcoded paths)])],
|
[disable using some hardcoded data paths extracted
|
||||||
|
from some default environment variables (the default
|
||||||
|
is to use hardcoded paths) in Verilator binary])],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) CFG_WITH_DEFENV=yes ;;
|
yes) CFG_WITH_DEFENV=yes ;;
|
||||||
no) CFG_WITH_DEFENV=no ;;
|
no) CFG_WITH_DEFENV=no ;;
|
||||||
@@ -43,7 +109,8 @@ AC_MSG_RESULT($CFG_WITH_DEFENV)
|
|||||||
AC_MSG_CHECKING(whether to show and stop on compilation warnings)
|
AC_MSG_CHECKING(whether to show and stop on compilation warnings)
|
||||||
AC_ARG_ENABLE([ccwarn],
|
AC_ARG_ENABLE([ccwarn],
|
||||||
[AS_HELP_STRING([--enable-ccwarn],
|
[AS_HELP_STRING([--enable-ccwarn],
|
||||||
[enable showing and stopping on compilation warnings])],
|
[enable showing and stopping on compilation warnings
|
||||||
|
in Verilator binrary and Verilated makefiles])],
|
||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes) CFG_WITH_CCWARN=yes ;;
|
yes) CFG_WITH_CCWARN=yes ;;
|
||||||
no) CFG_WITH_CCWARN=no ;;
|
no) CFG_WITH_CCWARN=no ;;
|
||||||
@@ -75,26 +142,11 @@ AC_ARG_ENABLE([longtests],
|
|||||||
AC_SUBST(CFG_WITH_LONGTESTS)
|
AC_SUBST(CFG_WITH_LONGTESTS)
|
||||||
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
|
AC_MSG_RESULT($CFG_WITH_LONGTESTS)
|
||||||
|
|
||||||
# CFG_WITH_PREC11
|
# Compiler flags (ensure they are not empty to avoid configure defaults)
|
||||||
AC_MSG_CHECKING(whether allow pre-C++11)
|
CFLAGS+=" "
|
||||||
AC_ARG_ENABLE([prec11],
|
CPPFLAGS+=" "
|
||||||
[AS_HELP_STRING([--enable-prec11],
|
CXXFLAGS+=" "
|
||||||
[enable pre-C++11 compilers])],
|
LDFLAGS+=" "
|
||||||
[case "${enableval}" in
|
|
||||||
yes) CFG_WITH_PREC11=yes ;;
|
|
||||||
no) CFG_WITH_PREC11=no ;;
|
|
||||||
*) AC_MSG_ERROR([bad value ${enableval} for --enable-prec11]) ;;
|
|
||||||
esac],
|
|
||||||
[CFG_WITH_PREC11=no;]
|
|
||||||
)
|
|
||||||
AC_SUBST(CFG_WITH_PREC11)
|
|
||||||
AC_MSG_RESULT($CFG_WITH_PREC11)
|
|
||||||
|
|
||||||
# Compiler flags
|
|
||||||
CFLAGS+=" -I${includedir}"
|
|
||||||
CPPFLAGS+=" -I${includedir}"
|
|
||||||
CXXFLAGS+=" -I${includedir}"
|
|
||||||
LDFLAGS+=" -L${libdir}"
|
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
@@ -111,18 +163,40 @@ AC_RUN_IFELSE(
|
|||||||
AC_MSG_RESULT(no);AC_MSG_ERROR([a working C++ compiler is required]),
|
AC_MSG_RESULT(no);AC_MSG_ERROR([a working C++ compiler is required]),
|
||||||
AC_MSG_RESULT(yes))
|
AC_MSG_RESULT(yes))
|
||||||
|
|
||||||
|
AC_CHECK_PROG(AR,ar,ar)
|
||||||
|
if test "x$AR" = "x" ; then
|
||||||
|
AC_MSG_ERROR([Cannot find "ar" in your PATH, please install it])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(PERL,perl)
|
AC_PATH_PROG(PERL,perl)
|
||||||
if test "x$PERL" = "x" ; then
|
if test "x$PERL" = "x" ; then
|
||||||
AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it])
|
AC_MSG_ERROR([Cannot find "perl" in your PATH, please install it])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(PYTHON3,python3)
|
||||||
|
if test "x$PYTHON3" = "x" ; then
|
||||||
|
AC_MSG_ERROR([Cannot find "python3" in your PATH, please install it])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_PATH_PROG(LEX,flex)
|
AC_PATH_PROG(LEX,flex)
|
||||||
if test "x$LEX" = "x" ; then
|
if test "x$LEX" = "x" ; then
|
||||||
AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it])
|
AC_MSG_ERROR([Cannot find "flex" in your PATH, please install it])
|
||||||
fi
|
fi
|
||||||
|
flex_version=$($LEX --version | head -1)
|
||||||
|
AC_MSG_RESULT([$LEX --version = $flex_version])
|
||||||
|
|
||||||
AC_PATH_PROG(YACC,bison)
|
AC_PATH_PROG(YACC,bison)
|
||||||
if test "x$YACC" = "x" ; then
|
if test "x$YACC" = "x" ; then
|
||||||
AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it])
|
AC_MSG_ERROR([Cannot find "bison" in your PATH, please install it])
|
||||||
fi
|
fi
|
||||||
|
bison_version=$($YACC --version | head -1)
|
||||||
|
AC_MSG_RESULT([$YACC --version = $bison_version])
|
||||||
|
|
||||||
|
AC_CHECK_PROG(OBJCACHE,ccache,ccache)
|
||||||
|
if test "x$OBJCACHE" != "x" ; then
|
||||||
|
objcache_version=$($OBJCACHE --version | head -1)
|
||||||
|
AC_MSG_RESULT([objcache is $OBJCACHE --version = $objcache_version])
|
||||||
|
fi
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
|
|
||||||
@@ -170,24 +244,34 @@ AC_DEFUN([_MY_CXX_CHECK_FLAG],
|
|||||||
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
CXXFLAGS="$ACO_SAVE_CXXFLAGS"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([_MY_CXX_CHECK_IFELSE],
|
||||||
|
[# _MY_CXX_CHECK_IFELSE(option,action-if-supported,action-if-not-supported)
|
||||||
|
# Check if compiler supports specific option. If it does,
|
||||||
|
# do action-if-supported, otherwise do action-if-not-supported
|
||||||
|
_MY_CXX_CHECK_FLAG($1)
|
||||||
|
if test "$_my_result" = "yes" ; then
|
||||||
|
true
|
||||||
|
$2
|
||||||
|
else
|
||||||
|
true
|
||||||
|
$3
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([_MY_CXX_CHECK_SET],
|
AC_DEFUN([_MY_CXX_CHECK_SET],
|
||||||
[# _MY_CXX_CHECK_SET(variable,flag) -- Check if compiler supports specific options
|
[# _MY_CXX_CHECK_SET(variable,option)
|
||||||
# If it does, set variable to flag, only if not previously set
|
# Check if compiler supports specific option. If it does,
|
||||||
|
# set variable to option, only if not previously set.
|
||||||
if test "$$1" = ""; then
|
if test "$$1" = ""; then
|
||||||
_MY_CXX_CHECK_FLAG($2)
|
_MY_CXX_CHECK_IFELSE($2, $1="$2")
|
||||||
if test "$_my_result" = "yes" ; then
|
|
||||||
$1="$2"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([_MY_CXX_CHECK_OPT],
|
AC_DEFUN([_MY_CXX_CHECK_OPT],
|
||||||
[# _MY_CXX_CHECK_OPT(flag) -- Check if compiler supports specific options
|
[# _MY_CXX_CHECK_OPT(variable,option)
|
||||||
# If it does, append flag to variable
|
# Check if compiler supports specific option. If it does,
|
||||||
_MY_CXX_CHECK_FLAG($2)
|
# append option to variable
|
||||||
if test "$_my_result" = "yes" ; then
|
_MY_CXX_CHECK_IFELSE($2, $1="$$1 $2")
|
||||||
$1="$$1 $2"
|
|
||||||
fi
|
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([_MY_LDLIBS_CHECK_FLAG],
|
AC_DEFUN([_MY_LDLIBS_CHECK_FLAG],
|
||||||
@@ -209,24 +293,68 @@ AC_DEFUN([_MY_LDLIBS_CHECK_FLAG],
|
|||||||
LIBS="$ACO_SAVE_LIBS"
|
LIBS="$ACO_SAVE_LIBS"
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
|
AC_DEFUN([_MY_LDLIBS_CHECK_IFELSE],
|
||||||
[# _MY_LDLIBS_CHECK_OPT(flag) -- Check if linker supports specific options
|
[# _MY_LDLIBS_CHECK_IFELSE(flag,action-if-supported,action-if-not-supported)
|
||||||
# If it does, append flag to variable
|
# Check if linker supports specific flag, if it does do action-if-supported
|
||||||
_MY_LDLIBS_CHECK_FLAG($2)
|
# otherwise do action-if-not-supported
|
||||||
|
_MY_LDLIBS_CHECK_FLAG($1)
|
||||||
if test "$_my_result" = "yes" ; then
|
if test "$_my_result" = "yes" ; then
|
||||||
$1="$$1 $2"
|
true
|
||||||
|
$2
|
||||||
|
else
|
||||||
|
true
|
||||||
|
$3
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([_MY_LDLIBS_CHECK_OPT],
|
||||||
|
[# _MY_LDLIBS_CHECK_OPT(variable, flag) -- Check if linker supports specific
|
||||||
|
# options. If it does, append flag to variable.
|
||||||
|
_MY_LDLIBS_CHECK_IFELSE($2, $1="$$1 $2")
|
||||||
|
])
|
||||||
|
|
||||||
|
# When using -m32. Check this first as later checks may fail with the -m32 flag.
|
||||||
|
if test "$CFG_ENABLE_M32" = "yes"; then
|
||||||
|
_MY_CXX_CHECK_IFELSE(
|
||||||
|
-m32,
|
||||||
|
[CXX="$CXX -m32"],
|
||||||
|
[AC_MSG_ERROR([--enable-m32 was given but compiler does not support -m32])])
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Similarly, add the coverage flags early as they influence later checks.
|
||||||
|
if test "$CFG_ENABLE_COVERAGE" = "yes"; then
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,--coverage)
|
||||||
|
# Otherwise inline may not show as uncovered
|
||||||
|
# If we use this then e.g. verilated.h functions properly show up
|
||||||
|
# if unused.
|
||||||
|
# However, VerilatedSerialize::write then changes from covered
|
||||||
|
# to uncovered (in G++ 9.3.0) even with all inlining turned off.
|
||||||
|
# Having false negative coverage is more effort then missing negatives.
|
||||||
|
# Also this seems to explode the runtime (since a lot more data).
|
||||||
|
# _MY_CXX_CHECK_OPT(CXX,-fkeep-inline-functions)
|
||||||
|
# Otherwise static may not show as uncovered
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-fkeep-static-functions)
|
||||||
|
# Exceptions can pollute the branch coverage data
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-fno-exceptions)
|
||||||
|
# Define-out some impossible stuff
|
||||||
|
_MY_CXX_CHECK_OPT(CXX,-DVL_GCOV)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Compiler flags to enable profiling
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PROFILE,-pg)
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_PROFILE)
|
||||||
|
|
||||||
# Flag to select newest language standard supported
|
# Flag to select newest language standard supported
|
||||||
# Macros work such that first option that passes is the one we take
|
# Macros work such that first option that passes is the one we take
|
||||||
# gnu++17 code is clean, but SystemC in 2018 doesn't link with it (bug1339)
|
# Currently enabled gnu++14/c++14 due to packaged SystemC dependency
|
||||||
# gnu++14 is the newest that Verilator supports
|
# gnu++17 is the newest that Verilator supports
|
||||||
# std++03 is the oldest that Verilator supports
|
# std++03 is the oldest that Verilator supports
|
||||||
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++20)
|
||||||
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++14)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++11)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=gnu++03)
|
||||||
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++20)
|
||||||
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++17)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++14)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_NEWEST,-std=c++11)
|
||||||
@@ -237,11 +365,13 @@ AC_SUBST(CFG_CXXFLAGS_STD_NEWEST)
|
|||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++03)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++03)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++11)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++11)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++14)
|
||||||
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=std++17)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++17)
|
||||||
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=c++20)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++03)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++03)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++11)
|
||||||
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++14)
|
_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++14)
|
||||||
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++17)
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++17)
|
||||||
|
#_MY_CXX_CHECK_SET(CFG_CXXFLAGS_STD_OLDEST,-std=gnu++20)
|
||||||
AC_SUBST(CFG_CXXFLAGS_STD_OLDEST)
|
AC_SUBST(CFG_CXXFLAGS_STD_OLDEST)
|
||||||
|
|
||||||
# Flags for compiling Verilator internals including parser, and Verilated files
|
# Flags for compiling Verilator internals including parser, and Verilated files
|
||||||
@@ -256,7 +386,6 @@ AC_SUBST(CFG_CXXFLAGS_WEXTRA)
|
|||||||
_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,-faligned-new)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-faligned-new)
|
||||||
_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,-Wno-undefined-bool-conversion)
|
|
||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-Wno-shadow)
|
||||||
AC_SUBST(CFG_CXXFLAGS_SRC)
|
AC_SUBST(CFG_CXXFLAGS_SRC)
|
||||||
|
|
||||||
@@ -267,6 +396,18 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-parentheses-equality)
|
|||||||
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_PARSER,-Wno-unused)
|
_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)
|
||||||
|
if test "$CFG_ENABLE_COVERAGE" = "no"; then # Do not optimize for the coverage build
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-Og)
|
||||||
|
fi
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-ggdb)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_DEBUG,-gz)
|
||||||
|
AC_SUBST(CFG_CXXFLAGS_DEBUG)
|
||||||
|
|
||||||
|
# Flags for linking the debug version of Verilator (in addition to above CFG_LDFLAGS_SRC)
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_DEBUG,-gz)
|
||||||
|
AC_SUBST(CFG_LDFLAGS_DEBUG)
|
||||||
|
|
||||||
# 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
|
||||||
# Random code often does / 0. Unfortunately VL_DIV_I(0,0) will warn
|
# Random code often does / 0. Unfortunately VL_DIV_I(0,0) will warn
|
||||||
@@ -283,6 +424,7 @@ m4_foreach([cflag],[
|
|||||||
[-mno-cet],
|
[-mno-cet],
|
||||||
[-Qunused-arguments],
|
[-Qunused-arguments],
|
||||||
[-Wno-bool-operation],
|
[-Wno-bool-operation],
|
||||||
|
[-Wno-tautological-bitwise-compare],
|
||||||
[-Wno-parentheses-equality],
|
[-Wno-parentheses-equality],
|
||||||
[-Wno-sign-compare],
|
[-Wno-sign-compare],
|
||||||
[-Wno-uninitialized],
|
[-Wno-uninitialized],
|
||||||
@@ -310,12 +452,55 @@ m4_foreach([ldflag], [
|
|||||||
AC_SUBST(CFG_LDLIBS_THREADS)
|
AC_SUBST(CFG_LDLIBS_THREADS)
|
||||||
AC_SUBST(CFG_LDFLAGS_THREADS_CMAKE)
|
AC_SUBST(CFG_LDFLAGS_THREADS_CMAKE)
|
||||||
|
|
||||||
# Set CFG_WITH_THREADED if can support threading
|
# When linking partially statically
|
||||||
AC_MSG_CHECKING(whether $CXX supports Verilated threads)
|
if test "$CFG_ENABLE_PARTIAL_STATIC" = "yes"; then
|
||||||
ACO_SAVE_CXXFLAGS="$CXXFLAGS"
|
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libgcc)
|
||||||
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD_NEWEST $CFG_CXXFLAGS_NO_UNUSED"
|
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -static-libstdc++)
|
||||||
AC_LINK_IFELSE(
|
_MY_LDLIBS_CHECK_OPT(CFG_LDFLAGS_SRC, -Xlinker -gc-sections)
|
||||||
[AC_LANG_PROGRAM([#include <thread>], [[ ]])],
|
LTCMALLOC=-l:libtcmalloc_minimal.a
|
||||||
|
else
|
||||||
|
LTCMALLOC=-ltcmalloc_minimal
|
||||||
|
fi
|
||||||
|
AC_SUBST(CFG_LDFLAGS_SRC)
|
||||||
|
|
||||||
|
# The pthread library is required by tcmalloc, so add it if it exists. If it
|
||||||
|
# does not, the tcmalloc check below will fail anyway, and linking against
|
||||||
|
# pthreads is harmless otherwise.
|
||||||
|
CFG_LIBS="$LIBS $CFG_LIBS"
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpthread)
|
||||||
|
|
||||||
|
# Check libraries for MingW
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lbcrypt)
|
||||||
|
_MY_LDLIBS_CHECK_OPT(CFG_LIBS, -lpsapi)
|
||||||
|
|
||||||
|
# Check if tcmalloc is available based on --enable-tcmalloc
|
||||||
|
_MY_LDLIBS_CHECK_IFELSE(
|
||||||
|
$LTCMALLOC,
|
||||||
|
[if test "$CFG_WITH_TCMALLOC" != "no"; then
|
||||||
|
CFG_LIBS="$LTCMALLOC $CFG_LIBS";
|
||||||
|
# If using tcmalloc, add some extra options to make the compiler not assume
|
||||||
|
# it is using it's own versions of the standard library functions
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-malloc)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-calloc)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-realloc)
|
||||||
|
_MY_CXX_CHECK_OPT(CFG_CXXFLAGS_SRC,-fno-builtin-free)
|
||||||
|
fi],
|
||||||
|
[if test "$CFG_WITH_TCMALLOC" = "yes"; then
|
||||||
|
AC_MSG_ERROR([--enable-tcmalloc was given but test for ${LTCMALLOC} failed])
|
||||||
|
fi])
|
||||||
|
AC_SUBST(CFG_LIBS)
|
||||||
|
|
||||||
|
# Need C++11 at least
|
||||||
|
#Alternative: AX_CXX_COMPILE_STDCXX([11])
|
||||||
|
AC_DEFUN([_MY_CXX_CHECK_CXX_VER],
|
||||||
|
[# _MY_CXX_CHECK_CXX_VER(flag) -- Check if compiler runs C++11
|
||||||
|
# Set $_my_result
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([#include <thread>
|
||||||
|
#if (__cplusplus < 201103L)
|
||||||
|
# error "Too old"
|
||||||
|
#endif
|
||||||
|
], [[ ]])],
|
||||||
[_my_result=yes
|
[_my_result=yes
|
||||||
if test -s conftest.err; then
|
if test -s conftest.err; then
|
||||||
if grep -e "$1" conftest.err >/dev/null; then
|
if grep -e "$1" conftest.err >/dev/null; then
|
||||||
@@ -323,24 +508,24 @@ AC_LINK_IFELSE(
|
|||||||
fi
|
fi
|
||||||
fi],
|
fi],
|
||||||
[_my_result=no])
|
[_my_result=no])
|
||||||
CFG_WITH_THREADED=$_my_result
|
])
|
||||||
AC_SUBST(CFG_WITH_THREADED)
|
|
||||||
AC_MSG_RESULT($CFG_WITH_THREADED)
|
|
||||||
|
|
||||||
# Check compiler flag
|
AC_MSG_CHECKING(whether $CXX supports C++11)
|
||||||
if test "$CFG_WITH_THREADED" = "no" ; then
|
_MY_CXX_CHECK_CXX_VER()
|
||||||
if test "$CFG_WITH_PREC11" = "no" ; then
|
AC_MSG_RESULT($_my_result)
|
||||||
AC_MSG_NOTICE([[]])
|
if test "$_my_result" = "no" ; then
|
||||||
AC_MSG_ERROR([[the $CXX compiler appears to not support C++11.
|
CXXFLAGS="$CXXFLAGS $CFG_CXXFLAGS_STD_NEWEST"
|
||||||
|
CFG_CXX_FLAGS_CMAKE="$CFG_CXX_FLAGS_CMAKE $CFG_CXXFLAGS_STD_NEWEST"
|
||||||
|
AC_MSG_CHECKING(whether $CXX supports C++11 with $CFG_CXXFLAGS_STD_NEWEST)
|
||||||
|
_MY_CXX_CHECK_CXX_VER()
|
||||||
|
AC_MSG_RESULT($_my_result)
|
||||||
|
fi
|
||||||
|
if test "$_my_result" = "no" ; then
|
||||||
|
AC_MSG_NOTICE([[]])
|
||||||
|
AC_MSG_ERROR([[the $CXX compiler appears to not support C++11.
|
||||||
|
|
||||||
Verilator plans to require a C++11 or newer compiler in a future release,
|
Verilator requires a C++11 or newer compiler.]])
|
||||||
unless sufficient people report problems. Therefore, if you do not have a
|
|
||||||
C++11 compiler, please post a message to
|
|
||||||
https://www.veripool.org/boards/3/topics/2580-Verilator-Requiring-C-11-compiler
|
|
||||||
indicating your OS and when you think C++11 might be ok, and then rerun
|
|
||||||
configure with the --enable-prec11 argument. Thanks.]])
|
|
||||||
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checks for library functions.
|
# Checks for library functions.
|
||||||
@@ -348,6 +533,24 @@ AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
|
|||||||
[AC_DEFINE([HAVE_STAT_NSEC],[1],[Defined if struct stat has st_mtim.tv_nsec])],
|
[AC_DEFINE([HAVE_STAT_NSEC],[1],[Defined if struct stat has st_mtim.tv_nsec])],
|
||||||
[], [#include <sys/stat.h>])
|
[], [#include <sys/stat.h>])
|
||||||
|
|
||||||
|
# HAVE_SYSTEMC
|
||||||
|
# - If found the default search path has it, so support is always enabled.
|
||||||
|
# - If not found or not system-wide, user can set SYSTEMC_INCLUDE.
|
||||||
|
# AC_CHECK_HEADERS seems to not locate on Travis-CI but include does work.
|
||||||
|
AC_MSG_CHECKING([whether SystemC is found (in system path)])
|
||||||
|
ACO_SAVE_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lsystemc"
|
||||||
|
AC_LINK_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[#include <systemc.h>
|
||||||
|
extern "C" int sc_main(int argc, char* argv[]) {}
|
||||||
|
]],[[sc_version()]])],
|
||||||
|
[_my_result=yes
|
||||||
|
AC_DEFINE([HAVE_SYSTEMC],[1],[Defined if have SystemC library])],
|
||||||
|
[_my_result=no])
|
||||||
|
AC_MSG_RESULT($_my_result)
|
||||||
|
LIBS="$ACO_SAVE_LIBS"
|
||||||
|
AC_SUBST(HAVE_SYSTEMC)
|
||||||
|
|
||||||
# Checks for system services
|
# Checks for system services
|
||||||
|
|
||||||
# Other install directories
|
# Other install directories
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
*.1
|
*.1
|
||||||
*.html
|
*.html
|
||||||
*.pdf
|
*.pdf
|
||||||
Makefile
|
_build
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
= How to contribute to Verilator
|
|
||||||
|
|
||||||
Thanks for using Verilator! We welcome your contributions in whatever form.
|
|
||||||
|
|
||||||
This contributing document contains some suggestions that may make
|
|
||||||
contributions flow more efficiently.
|
|
||||||
|
|
||||||
==== Did you find a bug?
|
|
||||||
|
|
||||||
* Please **Ensure the bug was not already reported** by searching
|
|
||||||
https://verilator.org/issues[Verilator Issues].
|
|
||||||
|
|
||||||
* If you're unable to find an open issue addressing the problem,
|
|
||||||
https://verilator.org/issues/new[open a new issue].
|
|
||||||
|
|
||||||
** Be sure to include a **code sample** or an **executable test case**
|
|
||||||
demonstrating the bug and expected behavior that is not occurring.
|
|
||||||
|
|
||||||
** The ideal example works against other simulators, and is in the
|
|
||||||
test_regress/t test format, as described in
|
|
||||||
link:internals.adoc[docs/internals].
|
|
||||||
|
|
||||||
==== Did you write a patch that fixes a bug?
|
|
||||||
|
|
||||||
* Please https://verilator.org/issues/new[Open a new issue].
|
|
||||||
|
|
||||||
* You may attach a patch to the issue, or (preferred) may point to a GitHub
|
|
||||||
repository branch within your GitHub account.
|
|
||||||
|
|
||||||
** Verilator uses Travis CI to provide continuous integration. You may
|
|
||||||
want to setup Travis CI on your GitHub branch to ensure your changes
|
|
||||||
keep the tests passing. See link:internals.adoc[docs/internals].
|
|
||||||
|
|
||||||
* Your source-code contributions must be certified as open source, under
|
|
||||||
the https://developercertificate.org/[Developer Certificate of
|
|
||||||
Origin]. On your first contribution, you must either:
|
|
||||||
|
|
||||||
** Have your patch include the addition of your name to
|
|
||||||
link:CONTRIBUTORS[docs/CONTRIBUTORS] (preferred).
|
|
||||||
|
|
||||||
** Use "git -s" as part of your commit. This adds a "signed-of-by"
|
|
||||||
attribute which will certify your contribution as described in the
|
|
||||||
https://github.com/wking/signed-off-by/blob/master/Documentation/SubmittingPatches[Signed-of-By
|
|
||||||
convention].
|
|
||||||
|
|
||||||
** Email, or post in an issue a statement that you certify your
|
|
||||||
contributions.
|
|
||||||
|
|
||||||
** In any of these cases your name will be added to
|
|
||||||
link:CONTRIBUTORS[docs/CONTRIBUTORS] and you are agreeing all future
|
|
||||||
contributions are also certified.
|
|
||||||
|
|
||||||
** We occasionally accept contributions where people do not want their
|
|
||||||
name published. Please email us; you must still certify your
|
|
||||||
contribution using email.
|
|
||||||
|
|
||||||
* Your test contributions are generally considered released into the public
|
|
||||||
domain, unless you request otherwise or put a GNU/Artistic license on
|
|
||||||
your test file.
|
|
||||||
|
|
||||||
* Most important is we get your patch. If you'd like to clean up
|
|
||||||
indentation and related issues ahead of our feedback, that is
|
|
||||||
appreciated; please see the coding conventions in
|
|
||||||
link:internals.adoc[docs/internals].
|
|
||||||
|
|
||||||
==== Do you have questions?
|
|
||||||
|
|
||||||
* Please see FAQ section and rest of the
|
|
||||||
https://verilator.org/verilator_doc.html[Verilator manual],
|
|
||||||
or https://verilator.org/verilator_doc.pdf[Verilator manual (PDF)].
|
|
||||||
|
|
||||||
* Ask any question in the
|
|
||||||
https://verilator.org/forum[Verilator forum].
|
|
||||||
|
|
||||||
==== Code of Conduct
|
|
||||||
|
|
||||||
* Our contributors and participants pledge to make participation in our
|
|
||||||
project and our community a positive experience for everyone. We follow
|
|
||||||
the https://www.contributor-covenant.org/version/1/4/code-of-conduct.html[Contributor
|
|
||||||
Covenant version 1.4].
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
Contributing to Verilator
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Thanks for using Verilator! We welcome your contributions in whatever form.
|
||||||
|
|
||||||
|
This contributing document contains some suggestions that may make
|
||||||
|
contributions flow more efficiently.
|
||||||
|
|
||||||
|
|
||||||
|
Did you find a bug?
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
- Please **Ensure the bug was not already reported** by searching
|
||||||
|
`Verilator Issues <https://verilator.org/issues>`__.
|
||||||
|
|
||||||
|
- If you're unable to find an open issue addressing the problem, `open a
|
||||||
|
new Verilator issue <https://verilator.org/issues/new>`__.
|
||||||
|
|
||||||
|
- Be sure to include a **code sample** or an **executable test case**
|
||||||
|
demonstrating the bug and expected behavior that is not occurring.
|
||||||
|
|
||||||
|
- The ideal example works against other simulators, and is in the
|
||||||
|
test_regress/t test format, as described in `docs/internals
|
||||||
|
<internals.rst>`__.
|
||||||
|
|
||||||
|
|
||||||
|
Did you write a patch that fixes a bug?
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
- Please `Open a new issue <https://verilator.org/issues/new>`__.
|
||||||
|
|
||||||
|
- You may attach a patch to the issue, or (preferred) may request a
|
||||||
|
GitHub pull request.
|
||||||
|
|
||||||
|
- Verilator uses GitHub Actions to provide continuous integration. You
|
||||||
|
may want to enable Actions on your GitHub branch to ensure your changes
|
||||||
|
keep the tests passing. See `docs/internals <internals.rst>`__.
|
||||||
|
|
||||||
|
- Your source-code contributions must be certified as open source,
|
||||||
|
under the `Developer Certificate of
|
||||||
|
Origin <https://developercertificate.org/>`__. On your first
|
||||||
|
contribution, you must either:
|
||||||
|
|
||||||
|
- Have your patch include the addition of your name to `docs/CONTRIBUTORS
|
||||||
|
<CONTRIBUTORS>`__ (preferred).
|
||||||
|
|
||||||
|
- Use "git -s" as part of your commit. This adds a "signed-of-by"
|
||||||
|
attribute which will certify your contribution as described in the
|
||||||
|
`Signed-of-By convention
|
||||||
|
<https://github.com/wking/signed-off-by/blob/master/Documentation/SubmittingPatches>`__.
|
||||||
|
|
||||||
|
- Email, or post in an issue a statement that you certify your
|
||||||
|
contributions.
|
||||||
|
|
||||||
|
- In any of these cases your name will be added to `docs/CONTRIBUTORS
|
||||||
|
<CONTRIBUTORS>`__ and you are agreeing all future contributions are
|
||||||
|
also certified.
|
||||||
|
|
||||||
|
- We occasionally accept contributions where people do not want their
|
||||||
|
name published. Please email us; you must still privately certify your
|
||||||
|
contribution.
|
||||||
|
|
||||||
|
- Your test contributions are generally considered released into the
|
||||||
|
Creative Commons Public Domain (CC0), unless you request otherwise or
|
||||||
|
put a GNU/Artistic license on your file.
|
||||||
|
|
||||||
|
- Most important is we get your patch. If you’d like to clean up
|
||||||
|
indentation and related issues ahead of our feedback, that is
|
||||||
|
appreciated; please see the coding conventions in `docs/internals
|
||||||
|
<internals.rst>`__.
|
||||||
|
|
||||||
|
|
||||||
|
Do you have questions?
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
- Please see FAQ section and rest of the `Verilator
|
||||||
|
manual <https://verilator.org/verilator_doc.html>`__, or `Verilator
|
||||||
|
manual (PDF) <https://verilator.org/verilator_doc.pdf>`__.
|
||||||
|
|
||||||
|
- Ask any question in the `Verilator forum
|
||||||
|
<https://verilator.org/forum>`__.
|
||||||
|
|
||||||
|
|
||||||
|
Code of Conduct
|
||||||
|
---------------
|
||||||
|
|
||||||
|
- Our contributors and participants pledge to make participation in our
|
||||||
|
project and our community a positive experience for everyone. We follow
|
||||||
|
the `Contributor Covenant version 1.4
|
||||||
|
<https://www.contributor-covenant.org/version/1/4/code-of-conduct/>`__.
|
||||||
|
|
||||||
|
Thanks!
|
||||||
+72
-4
@@ -1,33 +1,101 @@
|
|||||||
The contributors listed below have certified their Verilator contributions
|
The contributors listed below have certified their Verilator contributions
|
||||||
under the Developer Certificate of Origin
|
under the Developer Certificate of Origin (https://developercertificate.org/).
|
||||||
(https://developercertificate.org/).
|
|
||||||
|
|
||||||
Please see the Verilator manual for 200+ additional contributors. Thanks to
|
Please see the Verilator manual for 200+ additional contributors. Thanks to all.
|
||||||
all.
|
|
||||||
|
|
||||||
Ahmed El-Mahmoudy
|
Ahmed El-Mahmoudy
|
||||||
Alex Chadwick
|
Alex Chadwick
|
||||||
|
Àlex Torregrosa
|
||||||
|
Ameya Vikram Singh
|
||||||
|
Andreas Kuster
|
||||||
Chris Randall
|
Chris Randall
|
||||||
|
Conor McCullough
|
||||||
|
Dan Petrisko
|
||||||
|
David Horton
|
||||||
|
David Metz
|
||||||
|
David Stanford
|
||||||
|
David Turner
|
||||||
|
Drew Taussig
|
||||||
Driss Hafdi
|
Driss Hafdi
|
||||||
|
Edgar E. Iglesias
|
||||||
Eric Rippey
|
Eric Rippey
|
||||||
|
Fan Shupei
|
||||||
|
Felix Yan
|
||||||
Garrett Smith
|
Garrett Smith
|
||||||
|
Geza Lore
|
||||||
Gianfranco Costamagna
|
Gianfranco Costamagna
|
||||||
|
Glen Gibb
|
||||||
|
Graham Rushton
|
||||||
|
Harald Heckmann
|
||||||
Howard Su
|
Howard Su
|
||||||
|
Huang Rui
|
||||||
|
HyungKi Jeong
|
||||||
Iztok Jeras
|
Iztok Jeras
|
||||||
|
James Hanlon
|
||||||
|
James Hutchinson
|
||||||
|
James Pallister
|
||||||
|
Jamey Hicks
|
||||||
|
Jan Van Winkel
|
||||||
|
Jean Berniolles
|
||||||
Jeremy Bennett
|
Jeremy Bennett
|
||||||
John Coiner
|
John Coiner
|
||||||
|
John Demme
|
||||||
|
Jonathan Drolet
|
||||||
|
Josh Redford
|
||||||
Julien Margetts
|
Julien Margetts
|
||||||
|
Kaleb Barrett
|
||||||
Kanad Kanhere
|
Kanad Kanhere
|
||||||
Kevin Kiningham
|
Kevin Kiningham
|
||||||
|
Krzysztof Bieganski
|
||||||
|
Kuba Ober
|
||||||
|
Ludwig Rogiers
|
||||||
Lukasz Dalek
|
Lukasz Dalek
|
||||||
Maarten De Braekeleer
|
Maarten De Braekeleer
|
||||||
|
Maciej Sobkowski
|
||||||
|
Marco Widmer
|
||||||
|
Markus Krause
|
||||||
|
Marlon James
|
||||||
|
Marshal Qiao
|
||||||
|
Martin Schmidt
|
||||||
Matthew Ballance
|
Matthew Ballance
|
||||||
|
Michael Killough
|
||||||
Mike Popoloski
|
Mike Popoloski
|
||||||
|
Miodrag Milanović
|
||||||
|
Morten Borup Petersen
|
||||||
|
Nandu Raj
|
||||||
|
Nathan Kohagen
|
||||||
|
Nathan Myers
|
||||||
Patrick Stewart
|
Patrick Stewart
|
||||||
|
Paul Wright
|
||||||
|
Peter Horvath
|
||||||
|
Peter Monsson
|
||||||
Philipp Wagner
|
Philipp Wagner
|
||||||
|
Pierre-Henri Horrein
|
||||||
|
Pieter Kapsenberg
|
||||||
|
Piotr Binkowski
|
||||||
|
Qingyao Sun
|
||||||
|
Rafal Kapuscik
|
||||||
Richard Myers
|
Richard Myers
|
||||||
|
Rupert Swarbrick
|
||||||
|
Samuel Riedel
|
||||||
|
Sean Cross
|
||||||
Sebastien Van Cauwenberghe
|
Sebastien Van Cauwenberghe
|
||||||
|
Sergi Granell
|
||||||
Stefan Wallentowitz
|
Stefan Wallentowitz
|
||||||
|
Stephen Henry
|
||||||
|
Tim Snyder
|
||||||
|
Tobias Rosenkranz
|
||||||
|
Tobias Wölfel
|
||||||
Todd Strader
|
Todd Strader
|
||||||
|
Tomasz Gorochowik
|
||||||
|
Tymoteusz Blazejczyk
|
||||||
|
Udi Finkelstein
|
||||||
|
Unai Martinez-Corral
|
||||||
|
Vassilis Papaefstathiou
|
||||||
|
Veripool API Bot
|
||||||
|
Victor Besyakov
|
||||||
Wilson Snyder
|
Wilson Snyder
|
||||||
|
Yossi Nivin
|
||||||
|
Yuri Victorovich
|
||||||
|
Yutetsu TAKATSUKASA
|
||||||
Yves Mathieu
|
Yves Mathieu
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#*****************************************************************************
|
||||||
|
# DESCRIPTION: Verilator documentation: Makefile pre-configure version
|
||||||
|
#
|
||||||
|
# This file is part of Verilator.
|
||||||
|
#
|
||||||
|
# Code available from: https://verilator.org
|
||||||
|
#
|
||||||
|
# Copyright 2003-2021 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
|
||||||
|
#
|
||||||
|
######################################################################
|
||||||
|
#
|
||||||
|
# This file is intended only to be called from the top-level Verilator Makefile.
|
||||||
|
|
||||||
|
RST2HTML = rst2html
|
||||||
|
PYTHON3 = python3
|
||||||
|
DOXYGEN = doxygen
|
||||||
|
SPHINXOPTS ?= -c guide
|
||||||
|
SPHINXBUILD ?= sphinx-build
|
||||||
|
|
||||||
|
SOURCEDIR = guide
|
||||||
|
BUILDDIR = _build
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
|
||||||
|
default:
|
||||||
|
@echo "error: make not supported here, run 'make docs' from Verilator top-level"
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Intermediate rules
|
||||||
|
|
||||||
|
vl-extract: ../bin/verilator ../Changes
|
||||||
|
mkdir -p _build/gen
|
||||||
|
$(PYTHON3) bin/vl_sphinx_extract ../bin/verilator
|
||||||
|
sed 's/`/\&96;/g' < ../Changes > _build/gen/Changes
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# HTML
|
||||||
|
|
||||||
|
server: html
|
||||||
|
cd _build/html && $(PYTHON3) -m http.server
|
||||||
|
|
||||||
|
%.html: %.rst
|
||||||
|
$(RST2HTML) $< $@
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# PDF
|
||||||
|
|
||||||
|
.PHONY: verilator.pdf
|
||||||
|
|
||||||
|
verilator.pdf: pdf
|
||||||
|
pdf:
|
||||||
|
$(MAKE) vl-extract
|
||||||
|
$(MAKE) latex
|
||||||
|
$(PYTHON3) bin/vl_sphinx_fix _build
|
||||||
|
$(MAKE) -C _build/latex
|
||||||
|
cp _build/latex/verilator.pdf ..
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
html latex linkcheck spelling::
|
||||||
|
$(MAKE) vl-extract
|
||||||
|
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
||||||
|
$(PYTHON3) bin/vl_sphinx_fix _build
|
||||||
|
|
||||||
|
help:
|
||||||
|
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS)
|
||||||
|
|
||||||
|
clean mostlyclean distclean maintainer-clean::
|
||||||
|
rm -f $(SCRIPTS) *.tmp
|
||||||
|
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
|
||||||
|
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.idx
|
||||||
|
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
|
||||||
|
rm -f *.tex
|
||||||
|
|
||||||
|
distclean maintainer-clean::
|
||||||
|
rm -f *.info* *.1 *.html *.pdf $(INFOS)
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
#*****************************************************************************
|
|
||||||
# DESCRIPTION: Verilator documentation: Makefile pre-configure version
|
|
||||||
#
|
|
||||||
# This file is part of Verilator.
|
|
||||||
#
|
|
||||||
# Code available from: https://verilator.org
|
|
||||||
#
|
|
||||||
#*****************************************************************************
|
|
||||||
#
|
|
||||||
# Copyright 2003-2019 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.
|
|
||||||
#
|
|
||||||
# Verilator is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
#****************************************************************************/
|
|
||||||
#
|
|
||||||
# This file is intended only to be called from the top-level Verilator Makefile.
|
|
||||||
|
|
||||||
#### Start of system configuration section. ####
|
|
||||||
|
|
||||||
ASCIIDOCTOR = asciidoctor
|
|
||||||
DOXYGEN = doxygen
|
|
||||||
|
|
||||||
#### End of system configuration section. ####
|
|
||||||
######################################################################
|
|
||||||
|
|
||||||
.SUFFIXES:
|
|
||||||
|
|
||||||
default:
|
|
||||||
@echo "error: make not supported here, run 'make docs' from Verilator top-level"
|
|
||||||
|
|
||||||
%.html: %.adoc
|
|
||||||
$(ASCIIDOCTOR) $< -n -o $@
|
|
||||||
|
|
||||||
clean mostlyclean distclean maintainer-clean::
|
|
||||||
rm -f $(SCRIPTS) *.tmp
|
|
||||||
rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
|
|
||||||
rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs *.idx
|
|
||||||
rm -f *.ev *.evs *.ov *.ovs *.cv *.cvs *.ma *.mas
|
|
||||||
rm -f *.tex
|
|
||||||
|
|
||||||
distclean maintainer-clean::
|
|
||||||
rm -f *.info* *.1 *.html *.pdf $(INFOS)
|
|
||||||
rm -f Makefile
|
|
||||||
|
|
||||||
.PHONY: doxygen
|
|
||||||
|
|
||||||
doxygen:
|
|
||||||
$(DOXYGEN) doxygen.config
|
|
||||||
@@ -1,119 +0,0 @@
|
|||||||
// DESCRIPTION: Verilator: List of To Do issues.
|
|
||||||
//
|
|
||||||
// Copyright 2004-2019 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.
|
|
||||||
|
|
||||||
* Language support:
|
|
||||||
** Fix ordering of each bit separately in a signal (mips)
|
|
||||||
assign b[3:0] = b[7:4]; assign b[7:4] = in;
|
|
||||||
** Support UDP gate primitives/ cell libraries
|
|
||||||
(have code for combos - problem is sequential udps)
|
|
||||||
** Function to eval combo logic after /*verilator public*/ functions [gwaters]
|
|
||||||
** Support generated clocks (correctness)
|
|
||||||
** Recursive functions
|
|
||||||
** Verilog configuration files
|
|
||||||
** Expression coverage (see notes)
|
|
||||||
** Better tristate support
|
|
||||||
** UVM
|
|
||||||
|
|
||||||
* Long-term Features
|
|
||||||
** Assertions
|
|
||||||
** Tristate support
|
|
||||||
|
|
||||||
* Configure/Make/Install
|
|
||||||
** Distribute with flex/bison already expanded?
|
|
||||||
Flex library not needed. Probably too difficult to be worth it.
|
|
||||||
|
|
||||||
* Testing:
|
|
||||||
** Capture all inputs into global "rerun it" file
|
|
||||||
** Code to make wrapper that sets signals, so can do comparison checks
|
|
||||||
** New random program generator
|
|
||||||
** Better graph viewer with search and zoom
|
|
||||||
** Port and test against opencores.org code
|
|
||||||
** // verilator debug in code so can see only tree affecting those nodes
|
|
||||||
|
|
||||||
* Usability:
|
|
||||||
** Detect and pre-remove most UNOPTFLATs
|
|
||||||
** Better reporting of unopt problems, including what lines of code
|
|
||||||
** Report more errors (all of them?) before exiting [Eugene Weber]
|
|
||||||
** Auto-create scons config files
|
|
||||||
** Print version/etc message at runtime. (4.000?)
|
|
||||||
Include number of lines of code, percent comments, code complexity measurement
|
|
||||||
<-80chars------------------------------------------------------------------->
|
|
||||||
Verilator 3.600 - The fast free open-sourced simulator. Copyright 2001-2013.
|
|
||||||
Verilated #### modules, #### instances, ##### sigs,
|
|
||||||
#### non-comment lines, ##### ops, ### KB model size
|
|
||||||
|
|
||||||
* Lint:
|
|
||||||
** CDCRSTLOGIC should allow filtering with paths
|
|
||||||
"waive CDCRSTLOGIC --from a.b.sig --to a.c.sig --via OR"
|
|
||||||
|
|
||||||
* Internal Code:
|
|
||||||
** A Visitor class that understands how to traverse data types
|
|
||||||
** V3Graph should be templated container type, taking in Vertex + Edge types
|
|
||||||
** Instead of string, have an VEncodedString/VIdString which contains __DOT__ish
|
|
||||||
things, to reduce bugs. Also add _20 trailing space to \ encoded names.
|
|
||||||
|
|
||||||
* Runtime:
|
|
||||||
** New evalulation loop ~/src/verilator/notes/event_loop.txt (4.000?)
|
|
||||||
** Remove all private internal functions from top level wrapper header, move
|
|
||||||
to new level
|
|
||||||
** Completely standalone simulation
|
|
||||||
main() records arguments for $test$plusvars
|
|
||||||
instantiates top,
|
|
||||||
does tracing (support $dump?)
|
|
||||||
calls top->simulateForever()
|
|
||||||
exits
|
|
||||||
|
|
||||||
* Performance:
|
|
||||||
** Latch optimizations
|
|
||||||
** Constant propagation
|
|
||||||
Extra cleaning AND: 1 & ((VARREF >> 1) | ((&VARREF >> 1) & VARREF))
|
|
||||||
Extra shift (perhaps due to clean): if (1 & CAST (VARREF >> #))
|
|
||||||
** Gated clock and latch conversion to flops. [JeanPaul Vanitegem]
|
|
||||||
Could propagate the AND into pos/negedges and let domaining optimize.
|
|
||||||
** Negedge reset
|
|
||||||
Switch to remove negedges that don't matter
|
|
||||||
Can't remove async resets from control flops (like in syncronizers)
|
|
||||||
** If all references to array have a constant index, blow up into separate signals-per-index
|
|
||||||
** Bit-multiply for faster bit swapping and a=b[1,3,2] random bit reorderings.
|
|
||||||
** Move _last sets and all other combo logic inside master
|
|
||||||
if() that triggers on all possible sense items
|
|
||||||
** Rewrite and combine V3Life, V3Subst
|
|
||||||
If block temp only ever set in one place to constant, propagate it
|
|
||||||
Used in t_mem for array delayed assignments
|
|
||||||
Replace variables if set later in same cfunc branch
|
|
||||||
See for example duplicate sets of _narrow in cycle 90/91 of t_select_plusloop
|
|
||||||
** Same assignment on both if branches
|
|
||||||
"if (a) { ... b=2; } else { ... b=2;}" -> "b=2; if ..."
|
|
||||||
Careful though, as b could appear in the statement or multiple times in statement
|
|
||||||
(Could just require exatly two 'b's in statement)
|
|
||||||
** Simplify XOR/XNOR/AND/OR bit selection trees
|
|
||||||
Foo = A[1] ^ A[2] ^ A[3] etc are better as ^ ( A & 32'b...1110 )
|
|
||||||
** Combine variables into wider elements
|
|
||||||
Parallel statements on different bits should become single signal
|
|
||||||
Variables that are always consumed in "parallel" can be joined
|
|
||||||
** Duplicate assignments in gate optimization
|
|
||||||
Common to have many separate posedge blocks, each with identical
|
|
||||||
reset_r <= rst_in
|
|
||||||
** If signal is used only once (not counting trace), always gate substitute
|
|
||||||
Don't merge if any combining would form circ logic (out goes back to in)
|
|
||||||
** Multiple assignments each bit can become single assign with concat
|
|
||||||
Make sure a SEL of a CONCAT can get the single bit back.
|
|
||||||
** Usually blocks/values
|
|
||||||
Enable only after certain time, so VL_TIME_I(32) > 0x1e gets eliminated out
|
|
||||||
** Better ordering of a<=b, b<=c, put all refs to 'b' next to each other to optimize caching
|
|
||||||
** I-cache packing improvements (what/how?)
|
|
||||||
** Data cache organization (order of vars in class)
|
|
||||||
First have clocks,
|
|
||||||
then bools instead of uint32_t's
|
|
||||||
then based on what sense list they come from, all outputs, then all inputs
|
|
||||||
finally have any signals part of a "usually" block, or constant.
|
|
||||||
** Rather then tracking widths, have a MSB...LSB of this expression
|
|
||||||
(or better, a bitmask of bits relevant in this expression)
|
|
||||||
** Track recirculation and convert into clock-enables
|
|
||||||
** Clock enables should become new clocking domains for speed
|
|
||||||
** If floped(a) & flopped(b) and no other a&b, then instead flop(a&b).
|
|
||||||
** Sort by output bitselects so can combine more assignments (see DDP example dx_dm signal)
|
|
||||||
Vendored
+25
@@ -0,0 +1,25 @@
|
|||||||
|
/* Verilator blue #008fd7; set in html */
|
||||||
|
|
||||||
|
.wy-side-nav-search > div.version {
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-github::before,
|
||||||
|
.icon-github::before {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-home::before,
|
||||||
|
.icon-home::before {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-arrow-circle-right::before,
|
||||||
|
.icon-circle-arrow-right::before {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-arrow-circle-left::before,
|
||||||
|
.icon-circle-arrow-left::before {
|
||||||
|
content: "";
|
||||||
|
}
|
||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 4.6 KiB |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Executable
+64
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# pylint: disable=C0112,C0114,C0115,C0116,C0301,R0201,R0903
|
||||||
|
# -*- Python -*- See copyright, etc below
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import re
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
|
||||||
|
class VlSphinxExtract:
|
||||||
|
debug = 0
|
||||||
|
SkipBasenames = {}
|
||||||
|
|
||||||
|
def process(self, filename):
|
||||||
|
with open(filename) as fhr:
|
||||||
|
fhw = None
|
||||||
|
for line in fhr:
|
||||||
|
# =for VL_SPHINX_EXTRACT "file_to_write_to"
|
||||||
|
match = re.search(r'VL_SPHINX_EXTRACT +"([^"]+)"', line)
|
||||||
|
if match:
|
||||||
|
outname = match.group(1)
|
||||||
|
print("Writing %s" % outname)
|
||||||
|
fhw = open(outname, "w")
|
||||||
|
fhw.write(
|
||||||
|
".. comment: generated by vl_sphinx_extract from " +
|
||||||
|
filename + "\n")
|
||||||
|
fhw.write(".. code-block::\n")
|
||||||
|
elif re.match(r'^[=a-zA-Z0-9_]', line):
|
||||||
|
fhw = None
|
||||||
|
elif fhw:
|
||||||
|
fhw.write(line)
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
allow_abbrev=False,
|
||||||
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
|
description="""Read a file and extract documentation data.""",
|
||||||
|
epilog=
|
||||||
|
""" Copyright 2021-2021 by Wilson Snyder. This package 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""")
|
||||||
|
|
||||||
|
parser.add_argument('--debug',
|
||||||
|
action='store_const',
|
||||||
|
const=9,
|
||||||
|
help='enable debug')
|
||||||
|
parser.add_argument('path', help='path to extract from')
|
||||||
|
Args = parser.parse_args()
|
||||||
|
|
||||||
|
o = VlSphinxExtract()
|
||||||
|
o.debug = Args.debug
|
||||||
|
o.process(Args.path)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Local Variables:
|
||||||
|
# compile-command: "./vl_sphinx_extract --debug ../../bin/verilator"
|
||||||
|
# End:
|
||||||
Executable
+79
@@ -0,0 +1,79 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# pylint: disable=C0112,C0114,C0115,C0116,C0301,R0903
|
||||||
|
# -*- Python -*- See copyright, etc below
|
||||||
|
######################################################################
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
|
||||||
|
class VlSphinxFix:
|
||||||
|
debug = 0
|
||||||
|
SkipBasenames = {}
|
||||||
|
|
||||||
|
def process(self, path):
|
||||||
|
if os.path.isdir(path):
|
||||||
|
for basefile in os.listdir(path):
|
||||||
|
file = os.path.join(path, basefile)
|
||||||
|
if ((basefile != ".") and (basefile != "..")
|
||||||
|
and basefile not in self.SkipBasenames
|
||||||
|
and not os.path.islink(file)):
|
||||||
|
self.process(file)
|
||||||
|
elif re.search(r'\.(html|tex)$', path):
|
||||||
|
self._edit(path)
|
||||||
|
|
||||||
|
def _edit(self, filename):
|
||||||
|
is_html = re.search(r'\.(html)$', filename)
|
||||||
|
with open(filename) as fhr:
|
||||||
|
origfile = fhr.read()
|
||||||
|
wholefile = origfile
|
||||||
|
# Option doesn't like spaces, so we use
|
||||||
|
# :option:`/*verilator&32;metacomment*/`
|
||||||
|
wholefile = re.sub(r'verilator-32-', r'verilator-', wholefile)
|
||||||
|
if is_html:
|
||||||
|
wholefile = re.sub(r'&32;', r' ', wholefile)
|
||||||
|
wholefile = re.sub(r'&96;', r'`', wholefile)
|
||||||
|
else:
|
||||||
|
wholefile = re.sub(r'&32;', r' ', wholefile)
|
||||||
|
wholefile = re.sub(r'&96;', r'`', wholefile)
|
||||||
|
if wholefile != origfile:
|
||||||
|
if self.debug:
|
||||||
|
print("Edit %s" % filename)
|
||||||
|
tempname = filename + ".tmp"
|
||||||
|
with open(tempname, "w") as fhw:
|
||||||
|
fhw.write(wholefile)
|
||||||
|
os.rename(tempname, filename)
|
||||||
|
|
||||||
|
|
||||||
|
#######################################################################
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
allow_abbrev=False,
|
||||||
|
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||||
|
description="""Post-process Sphinx HTML.""",
|
||||||
|
epilog=
|
||||||
|
""" Copyright 2021-2021 by Wilson Snyder. This package 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""")
|
||||||
|
|
||||||
|
parser.add_argument('--debug',
|
||||||
|
action='store_const',
|
||||||
|
const=9,
|
||||||
|
help='enable debug')
|
||||||
|
parser.add_argument('path', help='path to edit')
|
||||||
|
Args = parser.parse_args()
|
||||||
|
|
||||||
|
o = VlSphinxFix()
|
||||||
|
o.debug = Args.debug
|
||||||
|
o.process(Args.path)
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Local Variables:
|
||||||
|
# compile-command: "./vl_sphinx_fix --debug _build"
|
||||||
|
# End:
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
/*! \mainpage Verilator Doxygen Documentation
|
|
||||||
*
|
|
||||||
* \section intro_sec Introduction
|
|
||||||
*
|
|
||||||
* This is a full doxygen analysis of the Verilator source tree.
|
|
||||||
*/
|
|
||||||
-1765
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
|||||||
|
.. comment: generated by t_lint_multidriven_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 2,5
|
||||||
|
|
||||||
|
always @(posedge clk) begin
|
||||||
|
out2[7:0] <= d0; // <--- Warning
|
||||||
|
end
|
||||||
|
always @(negedge clk) begin
|
||||||
|
out2[15:8] <= d0; // <--- Warning
|
||||||
|
end
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
.. comment: generated by t_lint_multidriven_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-MULTIDRIVEN: example.v:1:22 Signal has multiple driving blocks with different clocking: 'out2'
|
||||||
|
example.v:1:7 ... Location of first driving block
|
||||||
|
example.v:1:7 ... Location of other driving block
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
$error("User elaboration-time error");
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-USERERROR: example.v:1:7 User elaboration-time error
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
$fatal(0, "User elaboration-time fatal");
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-USERFATAL: example.v:1:7 User elaboration-time fatal
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
$info("User elaboration-time info");
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
-Info: example.v:1:7 User elaboration-time info
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
$warning("User elaboration-time warning");
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_assert_comp_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-USERWARN: example.v:1:7 User elaboration-time warning
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.. comment: generated by t_var_bad_hide_docs
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 2
|
||||||
|
|
||||||
|
module t;
|
||||||
|
integer t; //<--- Warning ('t' hidden by module 't')
|
||||||
|
endmodule
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.. comment: generated by t_var_bad_hide_docs
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-VARHIDDEN: example.v:2:12 Declaration of signal hides declaration in upper scope: 't'
|
||||||
|
example.v:1:8 ... Location of original declaration
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
.. comment: generated by t_lint_width_docs_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:linenos:
|
||||||
|
:emphasize-lines: 3
|
||||||
|
|
||||||
|
int array[5];
|
||||||
|
bit [1:0] rd_addr;
|
||||||
|
wire int rd_value = array[rd_addr]; //<--- Warning
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.. comment: generated by t_lint_width_docs_bad
|
||||||
|
.. code-block:: sv
|
||||||
|
:emphasize-lines: 1
|
||||||
|
|
||||||
|
wire int rd_value = array[{1'b0, rd_addr}]; //<--- Fixed
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
.. comment: generated by t_lint_width_docs_bad
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
%Warning-WIDTH: example.v:3:29 Bit extraction of array[4:0] requires 3 bit index, not 2 bits.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
****************
|
||||||
|
Revision History
|
||||||
|
****************
|
||||||
|
|
||||||
|
.. 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
|
||||||
|
"Revision History" in the sidebar.
|
||||||
|
|
||||||
|
Changes are contained in the :file:`Changes` file of the distribution, and
|
||||||
|
also summarized below. To subscribe to new versions see `Verilator
|
||||||
|
Announcements <https://github.com/verilator/verilator-announce>`_.
|
||||||
|
|
||||||
|
.. include:: ../_build/gen/Changes
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
# pylint: disable=C0103,C0114,C0116,E0402,W0622
|
||||||
|
#
|
||||||
|
# Configuration file for Verilator's Sphinx documentation builder.
|
||||||
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
#
|
||||||
|
# This file only contains overridden options. For a full list:
|
||||||
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||||
|
#
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Path setup
|
||||||
|
|
||||||
|
from datetime import datetime
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0, os.path.abspath('./_ext'))
|
||||||
|
|
||||||
|
import sphinx_rtd_theme # pylint: disable=wrong-import-position,
|
||||||
|
|
||||||
|
|
||||||
|
def get_vlt_version():
|
||||||
|
filename = "../../Makefile"
|
||||||
|
with open(filename) as fh:
|
||||||
|
for line in fh:
|
||||||
|
match = re.search(r"PACKAGE_VERSION_NUMBER *= *([a-z0-9.]+)", line)
|
||||||
|
if match:
|
||||||
|
return match.group(1)
|
||||||
|
return "unknown"
|
||||||
|
|
||||||
|
|
||||||
|
def setup(app):
|
||||||
|
app.add_css_file('css/vlt_sphinx.css')
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Project information
|
||||||
|
|
||||||
|
project = 'Verilator'
|
||||||
|
copyright = '2021 by Wilson Snyder, under LGPL-3.0 or Artistic-2.0'
|
||||||
|
author = 'Wilson Snyder'
|
||||||
|
|
||||||
|
# The master toctree document.
|
||||||
|
master_doc = "index"
|
||||||
|
|
||||||
|
version = get_vlt_version()
|
||||||
|
release = get_vlt_version()
|
||||||
|
|
||||||
|
rst_prolog = """
|
||||||
|
.. role:: vlopt(option)
|
||||||
|
"""
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- General configuration
|
||||||
|
|
||||||
|
# Add any Sphinx extension module names here, as strings. They can be
|
||||||
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||||
|
# ones.
|
||||||
|
# To install:
|
||||||
|
# sudo install enchant
|
||||||
|
# sudo pip3 install sphinx sphinx_rtd_theme breathe sphinxcontrib-spelling
|
||||||
|
# We keep this list empty for now to avoid needing dependencies
|
||||||
|
extensions = []
|
||||||
|
# extensions = ['breathe', 'sphinxcontrib.spelling']
|
||||||
|
|
||||||
|
# List of patterns, relative to source directory, that match files and
|
||||||
|
# directories to ignore when looking for source files.
|
||||||
|
# This pattern also affects html_static_path and html_extra_path.
|
||||||
|
exclude_patterns = [
|
||||||
|
'_build', 'Thumbs.db', '.DS_Store', 'internals.rst', 'xml.rst', 'gen/ex_*',
|
||||||
|
'CONTRIBUTING.rst'
|
||||||
|
]
|
||||||
|
|
||||||
|
# Warn about refs
|
||||||
|
nitpicky = True
|
||||||
|
nitpicky_ignore = []
|
||||||
|
|
||||||
|
# Number figures for referencing
|
||||||
|
numfig = True
|
||||||
|
|
||||||
|
# The name of the Pygments (syntax highlighting) style to use.
|
||||||
|
pygments_style = "sphinx"
|
||||||
|
|
||||||
|
# The suffix(es) of source filenames.
|
||||||
|
# You can specify multiple suffix as a list of string:
|
||||||
|
source_suffix = [".rst"]
|
||||||
|
|
||||||
|
# Add any paths that contain templates here, relative to this directory.
|
||||||
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
# Date format to ISO
|
||||||
|
today_fmt = datetime.now().strftime("%F")
|
||||||
|
|
||||||
|
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||||
|
todo_include_todos = True
|
||||||
|
|
||||||
|
# Could use this for internals<->guide references
|
||||||
|
# intersphinx_mapping = { 'sphinx': ('https://sphinx-doc.org/', None), }
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Options for HTML output
|
||||||
|
|
||||||
|
# html_baseurl =
|
||||||
|
|
||||||
|
html_domain_indices = False
|
||||||
|
|
||||||
|
html_logo = "../_static/verilator_192_150_min.png"
|
||||||
|
|
||||||
|
html_theme = 'sphinx_rtd_theme'
|
||||||
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||||
|
|
||||||
|
html_theme_options = {
|
||||||
|
'analytics_id': 'G-D27B0C9QEB',
|
||||||
|
'logo_only': True,
|
||||||
|
'style_nav_header_background': "#45acf8", # Default is #2980B9
|
||||||
|
# 'canonical_url':
|
||||||
|
}
|
||||||
|
|
||||||
|
html_context = {
|
||||||
|
'display_github': True,
|
||||||
|
'github_user': 'verilator',
|
||||||
|
'github_repo': 'verilator',
|
||||||
|
'github_version': 'master/docs/guide/',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add any paths that contain custom static files (such as style sheets) here,
|
||||||
|
# relative to this directory. They are copied after the builtin static files,
|
||||||
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||||
|
html_static_path = ['../_static']
|
||||||
|
|
||||||
|
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||||
|
html_show_sphinx = False
|
||||||
|
|
||||||
|
html_copy_source = False
|
||||||
|
html_show_sourcelink = False
|
||||||
|
|
||||||
|
html_use_index = False
|
||||||
|
|
||||||
|
html_favicon = "../_static/verilator_32x32_min.png"
|
||||||
|
|
||||||
|
# Custom sidebar templates, maps document names to template names.
|
||||||
|
# html_sidebars
|
||||||
|
|
||||||
|
# Add any extra paths that contain custom files (such as robots.txt or
|
||||||
|
# .htaccess) here, relative to this directory. These files are copied
|
||||||
|
# directly to the root of the documentation.
|
||||||
|
# html_extra_path = []
|
||||||
|
|
||||||
|
# Additional templates that should be rendered to pages, maps page names to
|
||||||
|
# template names.
|
||||||
|
# html_additional_pages = {}
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Options for Latex output
|
||||||
|
|
||||||
|
latex_logo = "../_static/verilator_logo.png"
|
||||||
|
|
||||||
|
latex_elements = {
|
||||||
|
'extraclassoptions': 'openany,oneside',
|
||||||
|
'papersize': 'letterpaper',
|
||||||
|
'makeindex': '',
|
||||||
|
'printindex': '',
|
||||||
|
# 'pointsize': '10pt',
|
||||||
|
# 'preamble': '',
|
||||||
|
}
|
||||||
|
|
||||||
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
# (source start file, target name, title,
|
||||||
|
# author, documentclass [howto, manual, or own class]).
|
||||||
|
# latex_documents = [
|
||||||
|
# (
|
||||||
|
# master_doc,
|
||||||
|
# "Verilog-to-Routing.tex",
|
||||||
|
# "Verilog-to-Routing Documentation",
|
||||||
|
# "VTR Developers",
|
||||||
|
# "manual",
|
||||||
|
# ),
|
||||||
|
# ]
|
||||||
|
|
||||||
|
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||||
|
# not chapters.
|
||||||
|
# latex_use_parts = False
|
||||||
|
|
||||||
|
# If true, show page references after internal links.
|
||||||
|
# latex_show_pagerefs = False
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
# latex_show_urls = False
|
||||||
|
|
||||||
|
latex_domain_indices = False
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Options for manual page output
|
||||||
|
|
||||||
|
# One entry per manual page. List of tuples
|
||||||
|
# (source start file, name, description, authors, manual section).
|
||||||
|
# man_pages = [(master_doc, "verilog-to-routing", "Verilog-to-Routing Documentation", [author], 1)]
|
||||||
|
|
||||||
|
# If true, show URL addresses after external links.
|
||||||
|
# man_show_urls = False
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Options for spelling
|
||||||
|
|
||||||
|
spelling_word_list_filename = ['spelling.txt']
|
||||||
|
spelling_ignore_contributor_names = True
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# -- Options for doxygen
|
||||||
|
|
||||||
|
# if shutil.which("doxygen"):
|
||||||
|
# breathe_projects = {
|
||||||
|
# "verilated": "../_build/doxygen/verilated/xml",
|
||||||
|
# }
|
||||||
|
# breathe_default_project = "verilated"
|
||||||
|
#
|
||||||
|
# if not os.environ.get("SKIP_DOXYGEN", None) == "True":
|
||||||
|
# for prjname, prjdir in breathe_projects.items():
|
||||||
|
# print("Generating doxygen files for {}...".format(prjname))
|
||||||
|
# os.makedirs(prjdir, exist_ok=True)
|
||||||
|
# cmd = "cd ../_doxygen && doxygen {}.dox".format(prjname)
|
||||||
|
# subprocess.call(cmd, shell=True)
|
||||||
|
# else:
|
||||||
|
# for prjname, prjdir in breathe_projects.items():
|
||||||
|
# assert os.path.exists(prjdir) == True, "Regenerate doxygen XML for {}".format(prjname)
|
||||||
|
|
||||||
|
breathe_projects = {"verilated": "_build/doxygen/verilated/xml/"}
|
||||||
|
breathe_default_project = "verilated"
|
||||||
|
breathe_default_members = ('members')
|
||||||
@@ -0,0 +1,516 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Connecting:
|
||||||
|
|
||||||
|
******************************
|
||||||
|
Connecting to Verilated Models
|
||||||
|
******************************
|
||||||
|
|
||||||
|
Structure of the Verilated Model
|
||||||
|
================================
|
||||||
|
|
||||||
|
Verilator outputs a :file:`{prefix}.h` header file which defines a class
|
||||||
|
named :code:`{prefix}` which represents the generated model the user is
|
||||||
|
supposed to instantiate. This model class defines the interface of the
|
||||||
|
Verilated model.
|
||||||
|
|
||||||
|
Verilator will additionally create a :file:`{prefix}.cpp` file, together
|
||||||
|
with additional .h and .cpp files for internals. See the :file:`examples`
|
||||||
|
directory in the kit for examples. See :ref:`Files Read/Written` for
|
||||||
|
information on all the files Verilator might output.
|
||||||
|
|
||||||
|
The output of Verilator will contain a :file:`{prefix}.mk` file that may be
|
||||||
|
used with Make to build a :file:`{prefix}__ALL.a` library with all required
|
||||||
|
objects in it.
|
||||||
|
|
||||||
|
The generated model class file manages all internal state required by the
|
||||||
|
model, and exposes the following interface that allows interaction with the
|
||||||
|
model:
|
||||||
|
|
||||||
|
* Top level IO ports are exposed as references to the appropriate internal
|
||||||
|
equivalents.
|
||||||
|
|
||||||
|
* Public top level module instances are exposed as pointers to allow access
|
||||||
|
to :code:`/* verilator public */` items.
|
||||||
|
|
||||||
|
* The root of the design hierarchy (as in SystemVerilog :code:`$root`) is
|
||||||
|
exposed via the :code:`rootp` member pointer to allow access to model
|
||||||
|
internals, including :code:`/* verilator public_flat */` items.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Porting from pre 4.210:
|
||||||
|
|
||||||
|
Model interface changes in version 4.210
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
Starting from version 4.210, the model class is an interface object.
|
||||||
|
|
||||||
|
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
|
||||||
|
you would refer to with :code:`$root` in SystemVerilog). This meant that
|
||||||
|
all internal variables that were implemented by Verilator in the root scope
|
||||||
|
were accessible as members of the model class itself. Note there were often
|
||||||
|
many such variable due to module inlining, including :code:`/* verilator
|
||||||
|
public_flat */` items.
|
||||||
|
|
||||||
|
This means that user code that accesses internal signals in the model
|
||||||
|
(likely including :code:`/* verilator public_flat */` signals, as they are
|
||||||
|
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
|
||||||
|
accessible in the model class via references.
|
||||||
|
|
||||||
|
* No change required for accessing :code:`/* verilator public */` items.
|
||||||
|
These are directly accessible via sub-module pointers in the model class.
|
||||||
|
|
||||||
|
* Accessing any other internal members, including
|
||||||
|
:code:`/* verilator public_flat */` items requires the following changes:
|
||||||
|
|
||||||
|
* Additionally include :file:`{prefix}___024root.h`. This header defines
|
||||||
|
type of the :code:`rootp` pointer within the model class. Note the
|
||||||
|
:code:`__024` substring is the Verilator escape sequence for the
|
||||||
|
:code:`$` character, i.e.: :code:`rootp` points to the Verilated
|
||||||
|
SystemVerilog :code:`$root` scope.
|
||||||
|
|
||||||
|
* Replace :code:`modelp->internal->member->lookup` references with
|
||||||
|
:code:`modelp->rootp->internal->member->lookup` references, which
|
||||||
|
contain one additional indirection via the :code:`rootp` pointer.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Connecting to C++:
|
||||||
|
|
||||||
|
Connecting to C++
|
||||||
|
=================
|
||||||
|
|
||||||
|
In C++ output mode (:vlopt:`--cc`), the Verilator generated model class is 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
|
||||||
|
model. Here is a simple example:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include <verilated.h> // Defines common routines
|
||||||
|
#include <iostream> // Need std::cout
|
||||||
|
#include "Vtop.h" // From Verilating "top.v"
|
||||||
|
|
||||||
|
Vtop *top; // Instantiation of model
|
||||||
|
|
||||||
|
vluint64_t main_time = 0; // Current simulation time
|
||||||
|
// This is a 64-bit integer to reduce wrap over issues and
|
||||||
|
// allow modulus. This is in units of the timeprecision
|
||||||
|
// used in Verilog (or from --timescale-override)
|
||||||
|
|
||||||
|
double sc_time_stamp() { // Called by $time in Verilog
|
||||||
|
return main_time; // converts to double, to match
|
||||||
|
// what SystemC does
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
Verilated::commandArgs(argc, argv); // Remember args
|
||||||
|
|
||||||
|
top = new Vtop; // Create model
|
||||||
|
|
||||||
|
top->reset_l = 0; // Set some inputs
|
||||||
|
|
||||||
|
while (!Verilated::gotFinish()) {
|
||||||
|
if (main_time > 10) {
|
||||||
|
top->reset_l = 1; // Deassert reset
|
||||||
|
}
|
||||||
|
if ((main_time % 10) == 1) {
|
||||||
|
top->clk = 1; // Toggle clock
|
||||||
|
}
|
||||||
|
if ((main_time % 10) == 6) {
|
||||||
|
top->clk = 0;
|
||||||
|
}
|
||||||
|
top->eval(); // Evaluate model
|
||||||
|
cout << top->out << endl; // Read a output
|
||||||
|
main_time++; // Time passes...
|
||||||
|
}
|
||||||
|
|
||||||
|
top->final(); // Done simulating
|
||||||
|
// // (Though this example doesn't get here)
|
||||||
|
delete top;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Note top level IO signals are read and written as members of the model. You
|
||||||
|
call the :code:`eval()` method to evaluate the model. When the simulation is
|
||||||
|
complete call the :code:`final()` method to execute any SystemVerilog final
|
||||||
|
blocks, and complete any assertions. See :ref:`Evaluation Loop`.
|
||||||
|
|
||||||
|
|
||||||
|
Connecting to SystemC
|
||||||
|
=====================
|
||||||
|
|
||||||
|
In SystemC output mode (:vlopt:`--sc`), the Verilator generated model class
|
||||||
|
is a SystemC SC_MODULE. This module will attach directly into a SystemC
|
||||||
|
netlist as an instantiation.
|
||||||
|
|
||||||
|
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
|
||||||
|
bits wide become uint32_t's. Pins 33-64 bits wide become sc_bv's or
|
||||||
|
vluint64_t's depending on the :vlopt:`--no-pins64` option. Wider pins
|
||||||
|
become sc_bv's. (Uints simulate the fastest so are used where possible.)
|
||||||
|
|
||||||
|
Model internals, including lower level sub-modules are not pure SystemC
|
||||||
|
code. This is a feature, as using the SystemC pin interconnect scheme
|
||||||
|
everywhere would reduce performance by an order of magnitude.
|
||||||
|
|
||||||
|
|
||||||
|
Direct Programming Interface (DPI)
|
||||||
|
==================================
|
||||||
|
|
||||||
|
Verilator supports SystemVerilog Direct Programming Interface import and
|
||||||
|
export statements. Only the SystemVerilog form ("DPI-C") is supported, not
|
||||||
|
the original Synopsys-only DPI.
|
||||||
|
|
||||||
|
DPI Example
|
||||||
|
-----------
|
||||||
|
|
||||||
|
In the SYSTEMC example above, if you wanted to import C++ functions into
|
||||||
|
Verilog, put in our.v:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
import "DPI-C" function int add (input int a, input int b);
|
||||||
|
|
||||||
|
initial begin
|
||||||
|
$display("%x + %x = %x", 1, 2, add(1,2));
|
||||||
|
endtask
|
||||||
|
|
||||||
|
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
||||||
|
prototype to call this function:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
extern int add(int a, int b);
|
||||||
|
|
||||||
|
From the sc_main.cpp file (or another .cpp file passed to the Verilator
|
||||||
|
command line, or the link), you'd then:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "svdpi.h"
|
||||||
|
#include "Vour__Dpi.h"
|
||||||
|
int add(int a, int b) { return a+b; }
|
||||||
|
|
||||||
|
|
||||||
|
DPI System Task/Functions
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
Verilator extends the DPI format to allow using the same scheme to
|
||||||
|
efficiently add system functions. Simply use a dollar-sign prefixed system
|
||||||
|
function name for the import, but note it must be escaped.
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
export "DPI-C" function integer \$myRand;
|
||||||
|
|
||||||
|
initial $display("myRand=%d", $myRand());
|
||||||
|
|
||||||
|
Going the other direction, you can export Verilog tasks so they can be
|
||||||
|
called from C++:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
export "DPI-C" task publicSetBool;
|
||||||
|
|
||||||
|
task publicSetBool;
|
||||||
|
input bit in_bool;
|
||||||
|
var_bool = in_bool;
|
||||||
|
endtask
|
||||||
|
|
||||||
|
Then after Verilating, Verilator will create a file Vour__Dpi.h with the
|
||||||
|
prototype to call this function:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
extern void publicSetBool(svBit in_bool);
|
||||||
|
|
||||||
|
From the sc_main.cpp file, you'd then:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "Vour__Dpi.h"
|
||||||
|
publicSetBool(value);
|
||||||
|
|
||||||
|
Or, alternatively, call the function under the design class. This isn't
|
||||||
|
DPI compatible but is easier to read and better supports multiple designs.
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "Vour__Dpi.h"
|
||||||
|
Vour::publicSetBool(value);
|
||||||
|
// or top->publicSetBool(value);
|
||||||
|
|
||||||
|
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
|
||||||
|
standard functions within svdpi.h, after the module is instantiated, but
|
||||||
|
before the task(s) and/or function(s) are called.
|
||||||
|
|
||||||
|
For example, if the top level module is instantiated with the name "dut"
|
||||||
|
and the name references within tasks are all hierarchical (dotted) names
|
||||||
|
with respect to that top level module, then the scope could be set with
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "svdpi.h"
|
||||||
|
...
|
||||||
|
svSetScope(svGetScopeFromName("TOP.dut"));
|
||||||
|
|
||||||
|
(Remember that Verilator adds a "TOP" to the top of the module hierarchy.)
|
||||||
|
|
||||||
|
Scope can also be set from within a DPI imported C function that has been
|
||||||
|
called from Verilog by querying the scope of that function. See the
|
||||||
|
sections on DPI Context Functions and DPI Header Isolation below and the
|
||||||
|
comments within the svdpi.h header for more information.
|
||||||
|
|
||||||
|
|
||||||
|
DPI Imports that access signals
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
wrapper:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
logic din;
|
||||||
|
|
||||||
|
// This DPI function will read "din"
|
||||||
|
import "DPI-C" context function void dpi_that_accesses_din();
|
||||||
|
|
||||||
|
always @(...)
|
||||||
|
dpi_din_args(din);
|
||||||
|
|
||||||
|
task dpi_din_args(input din);
|
||||||
|
/* verilator no_inline_task */
|
||||||
|
dpi_that_accesses_din();
|
||||||
|
endtask
|
||||||
|
|
||||||
|
|
||||||
|
DPI Display Functions
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Verilator allows writing $display like functions using this syntax:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
import "DPI-C" function void
|
||||||
|
\$my_display(input string formatted /*verilator sformat*/ );
|
||||||
|
|
||||||
|
The :option:`/*verilator&32;sformat*/` metacomment indicates that this
|
||||||
|
function accepts a $display like format specifier followed by any number of
|
||||||
|
arguments to satisfy the format.
|
||||||
|
|
||||||
|
|
||||||
|
DPI Context Functions
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Verilator supports IEEE DPI Context Functions. Context imports pass the
|
||||||
|
simulator context, including calling scope name, and filename and line
|
||||||
|
number to the C code. For example, in Verilog:
|
||||||
|
|
||||||
|
.. code-block::
|
||||||
|
|
||||||
|
import "DPI-C" context function int 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
|
||||||
|
information, in this case the line number of the Verilog statement that
|
||||||
|
invoked the dpic_line function:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
int dpic_line() {
|
||||||
|
// Get a scope: svScope scope = svGetScope();
|
||||||
|
|
||||||
|
const char* scopenamep = svGetNameFromScope(scope);
|
||||||
|
assert(scopenamep);
|
||||||
|
|
||||||
|
const char* filenamep = "";
|
||||||
|
int lineno = 0;
|
||||||
|
if (svGetCallerInfo(&filenamep, &lineno)) {
|
||||||
|
printf("dpic_line called from scope %s on line %d\n",
|
||||||
|
scopenamep, lineno);
|
||||||
|
return lineno;
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
See the IEEE Standard for more information.
|
||||||
|
|
||||||
|
|
||||||
|
DPI Header Isolation
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Verilator places the IEEE standard header files such as svdpi.h into a
|
||||||
|
separate include directory, vltstd (VeriLaTor STandarD). When compiling
|
||||||
|
most applications $VERILATOR_ROOT/include/vltstd would be in the include
|
||||||
|
path along with the normal $VERILATOR_ROOT/include. However, when
|
||||||
|
compiling Verilated models into other simulators which have their own
|
||||||
|
svdpi.h and similar standard files with different contents, the vltstd
|
||||||
|
directory should not be included to prevent picking up incompatible
|
||||||
|
definitions.
|
||||||
|
|
||||||
|
|
||||||
|
Public Functions
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Instead of DPI exporting, there's also Verilator public functions, which
|
||||||
|
are slightly faster, but less compatible.
|
||||||
|
|
||||||
|
|
||||||
|
Verification Procedural Interface (VPI)
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
Verilator supports a limited subset of the VPI. This subset allows
|
||||||
|
inspection, examination, value change callbacks, and depositing of values
|
||||||
|
to public signals only.
|
||||||
|
|
||||||
|
VPI is enabled with the Verilator :vlopt:`--vpi` option.
|
||||||
|
|
||||||
|
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
|
||||||
|
documented below.
|
||||||
|
|
||||||
|
Verilator has an important difference from an event based simulator; signal
|
||||||
|
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
|
||||||
|
called. Normally this would be part of the normal evaluation (i.e. the
|
||||||
|
next clock edge), not as part of the value change. This makes the
|
||||||
|
performance of VPI routines extremely fast compared to event based
|
||||||
|
simulators, but can confuse some test-benches that expect immediate
|
||||||
|
propagation.
|
||||||
|
|
||||||
|
Note the VPI by its specified implementation will always be much slower
|
||||||
|
than accessing the Verilator values by direct reference
|
||||||
|
(structure->module->signame), as the VPI accessors perform lookup in
|
||||||
|
functions at simulation runtime requiring at best hundreds of instructions,
|
||||||
|
while the direct references are evaluated by the compiler and result in
|
||||||
|
only a couple of instructions.
|
||||||
|
|
||||||
|
For signal callbacks to work the main loop of the program must call
|
||||||
|
:code:`VerilatedVpi::callValueCbs()`.
|
||||||
|
|
||||||
|
|
||||||
|
.. _VPI Example:
|
||||||
|
|
||||||
|
VPI Example
|
||||||
|
-----------
|
||||||
|
|
||||||
|
In the below example, we have readme marked read-only, and writeme which if
|
||||||
|
written from outside the model will have the same semantics as if it
|
||||||
|
changed on the specified clock edge.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cat >our.v <<'EOF'
|
||||||
|
module our (input clk);
|
||||||
|
reg readme /*verilator public_flat_rd*/;
|
||||||
|
reg writeme /*verilator public_flat_rw @(posedge clk) */;
|
||||||
|
initial $finish;
|
||||||
|
endmodule
|
||||||
|
EOF
|
||||||
|
|
||||||
|
There are many online tutorials and books on the VPI, but an example that
|
||||||
|
accesses the above signal "readme" would be:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cat >sim_main.cpp <<'<<EOF'
|
||||||
|
#include "Vour.h"
|
||||||
|
#include "verilated.h"
|
||||||
|
#include "verilated_vpi.h" // Required to get definitions
|
||||||
|
|
||||||
|
vluint64_t main_time = 0; // See comments in first example
|
||||||
|
double sc_time_stamp() { return main_time; }
|
||||||
|
|
||||||
|
void read_and_check() {
|
||||||
|
vpiHandle vh1 = vpi_handle_by_name((PLI_BYTE8*)"TOP.our.readme", NULL);
|
||||||
|
if (!vh1) vl_fatal(__FILE__, __LINE__, "sim_main", "No handle found");
|
||||||
|
const char* name = vpi_get_str(vpiName, vh1);
|
||||||
|
printf("Module name: %s\n", name); // Prints "readme"
|
||||||
|
|
||||||
|
s_vpi_value v;
|
||||||
|
v.format = vpiIntVal;
|
||||||
|
vpi_get_value(vh1, &v);
|
||||||
|
printf("Value of v: %d\n", v.value.integer); // Prints "readme"
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char** argv, char** env) {
|
||||||
|
Verilated::commandArgs(argc, argv);
|
||||||
|
Vour* top = new Vour;
|
||||||
|
Verilated::internalsDump(); // See scopes to help debug
|
||||||
|
while (!Verilated::gotFinish()) {
|
||||||
|
top->eval();
|
||||||
|
VerilatedVpi::callValueCbs(); // For signal callbacks
|
||||||
|
read_and_check();
|
||||||
|
}
|
||||||
|
delete top;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
.. _Evaluation Loop:
|
||||||
|
|
||||||
|
Wrappers and Model Evaluation Loop
|
||||||
|
==================================
|
||||||
|
|
||||||
|
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
|
||||||
|
user must call :code:`eval()`, or :code:`eval_step()` and
|
||||||
|
:code:`eval_end_step()`.
|
||||||
|
|
||||||
|
1. When there is a single design instantiated at the C++ level that needs
|
||||||
|
to evaluate within a given context, call :code:`designp->eval()`.
|
||||||
|
|
||||||
|
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
|
||||||
|
:code:`->eval_step()` on all other designs. Then call
|
||||||
|
:code:`->eval_end_step()` on the first design then all other designs. If
|
||||||
|
there is only a single design, you would call :code:`eval_step()` then
|
||||||
|
:code:`eval_end_step()`; in fact :code:`eval()` described above is just a
|
||||||
|
wrapper which calls these two functions.
|
||||||
|
|
||||||
|
When :code:`eval()` (or :code:`eval_step()`) is called Verilator looks for
|
||||||
|
changes in clock signals and evaluates related sequential always blocks,
|
||||||
|
such as computing always_ff @ (posedge...) outputs. Then Verilator
|
||||||
|
evaluates combinatorial logic.
|
||||||
|
|
||||||
|
Note combinatorial logic is not computed before sequential always blocks
|
||||||
|
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.
|
||||||
|
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
For more information on evaluation, see :file:`docs/internals.rst` in the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
|
||||||
|
Verilated and VerilatedContext
|
||||||
|
==============================
|
||||||
|
|
||||||
|
Multiple Verilated models may be part of the same simulation context, that
|
||||||
|
is share a VPI interface, sense of time, and common settings. This common
|
||||||
|
simulation context information is stored in a ``VerilatedContext``
|
||||||
|
structure. If a ``VerilatedContext`` is not created prior to creating a
|
||||||
|
model, a default global one is created automatically.
|
||||||
|
|
||||||
|
The ``Verilated::`` methods, including the ``Verilated::commandArgs`` call
|
||||||
|
shown above, simply call VerilatedContext methods using the default global
|
||||||
|
VerilatedContext. (Technically they operate on the last one used by a
|
||||||
|
given thread.) If you are using multiple simulation contexts you should
|
||||||
|
not use the Verilated:: methods, and instead always use VerilatedContext
|
||||||
|
methods called on the appropriate VerilatedContext object.
|
||||||
|
|
||||||
|
For methods available under Verilated and VerilatedContext see
|
||||||
|
:file:`include/verilated.h` in the distribution.
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
*******************************
|
||||||
|
Contributing and Reporting Bugs
|
||||||
|
*******************************
|
||||||
|
|
||||||
|
Announcements
|
||||||
|
=============
|
||||||
|
|
||||||
|
To get notified of new releases and other important announcements, go to
|
||||||
|
`Verilator announcement repository
|
||||||
|
<https://github.com/verilator/verilator-announce>`__ and follow the
|
||||||
|
instructions there.
|
||||||
|
|
||||||
|
|
||||||
|
Reporting Bugs
|
||||||
|
==============
|
||||||
|
|
||||||
|
First, check the :ref:`Language Limitations` section.
|
||||||
|
|
||||||
|
Next, try the :vlopt:`--debug` option. This will enable additional
|
||||||
|
internal assertions, and may help identify the problem.
|
||||||
|
|
||||||
|
Finally, reduce your code to the smallest possible routine that exhibits
|
||||||
|
the bug. Even better, create a test in the :file:`test_regress/t`
|
||||||
|
directory, as follows:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cd test_regress
|
||||||
|
cp -p t/t_EXAMPLE.pl t/t_BUG.pl
|
||||||
|
cp -p t/t_EXAMPLE.v t/t_BUG.v
|
||||||
|
|
||||||
|
There are many hints on how to write a good test in the
|
||||||
|
:file:`test_regress/driver.pl` documentation which can be seen by running:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||||
|
test_regress/driver.pl --help
|
||||||
|
|
||||||
|
Edit :file:`t/t_BUG.pl` to suit your example; you can do anything you want
|
||||||
|
in the Verilog code there; just make sure it retains the single clk input
|
||||||
|
and no outputs. Now, the following should fail:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
cd $VERILATOR_ROOT # Need the original distribution kit
|
||||||
|
cd test_regress
|
||||||
|
t/t_BUG.pl # Run on Verilator
|
||||||
|
t/t_BUG.pl --debug # Run on Verilator, passing --debug to Verilator
|
||||||
|
t/t_BUG.pl --vcs # Run on VCS simulator
|
||||||
|
t/t_BUG.pl --nc|--iv|--ghdl # Likewise on other simulators
|
||||||
|
|
||||||
|
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
|
||||||
|
debugging enabled. The full set of test options can be seen by running
|
||||||
|
:command:`driver.pl --help` as shown above.
|
||||||
|
|
||||||
|
Finally, report the bug at `Verilator Issues
|
||||||
|
<https://verilator.org/issues>`_. The bug will become publicly visible; if
|
||||||
|
this is unacceptable, mail the bug report to ``[email protected]``.
|
||||||
|
|
||||||
|
|
||||||
|
.. Contributing
|
||||||
|
.. ============
|
||||||
|
.. include:: ../CONTRIBUTING.rst
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
************************
|
||||||
|
Contributors and Origins
|
||||||
|
************************
|
||||||
|
|
||||||
|
Authors
|
||||||
|
=======
|
||||||
|
|
||||||
|
When possible, please instead report bugs at `Verilator Issues
|
||||||
|
<https://verilator.org/issues>`_.
|
||||||
|
|
||||||
|
Primary author is Wilson Snyder <[email protected]>.
|
||||||
|
|
||||||
|
Major concepts by Paul Wasson, Duane Galbi, John Coiner and Jie Xu.
|
||||||
|
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
============
|
||||||
|
|
||||||
|
Many people have provided ideas and other assistance with Verilator.
|
||||||
|
|
||||||
|
Verilator is receiving major development support from the `CHIPS Alliance
|
||||||
|
<https://chipsalliance.org>`_.
|
||||||
|
|
||||||
|
Previous major corporate sponsors of Verilator, by providing significant
|
||||||
|
contributions of time or funds included include: Atmel Corporation, Cavium
|
||||||
|
Inc., Compaq Corporation, Digital Equipment Corporation, Embecosm Ltd.,
|
||||||
|
Hicamp Systems, Intel Corporation, Mindspeed Technologies Inc., MicroTune
|
||||||
|
Inc., picoChip Designs Ltd., Sun Microsystems Inc., Nauticus Networks Inc.,
|
||||||
|
and SiCortex Inc.
|
||||||
|
|
||||||
|
The people who have contributed major functionality are: Byron Bradley,
|
||||||
|
Jeremy Bennett, Lane Brooks, John Coiner, Duane Galbi, Geza Lore, Todd
|
||||||
|
Strader, Stefan Wallentowitz, Paul Wasson, Jie Xu, and Wilson Snyder.
|
||||||
|
Major testers included Jeff Dutton, Jonathon Donaldson, Ralf Karge, David
|
||||||
|
Hewson, Iztok Jeras, Wim Michiels, Alex Solomatnikov, Sebastien Van
|
||||||
|
Cauwenberghe, Gene Weber, and Clifford Wolf.
|
||||||
|
|
||||||
|
Some of the people who have provided ideas, and feedback for Verilator
|
||||||
|
include: David Addison, Nikana Anastasiadis, Vasu Arasanipalai, Jens Arm,
|
||||||
|
Tariq B. Ahmad, Sharad Bagri, Matthew Ballance, Andrew Bardsley, Matthew
|
||||||
|
Barr, Geoff Barrett, Kaleb Barrett, Julius Baxter, Jeremy Bennett, Michael
|
||||||
|
Berman, Jean Berniolles, Victor Besyakov, Moinak Bhattacharyya, Krzysztof
|
||||||
|
Bieganski, David Binderman, Piotr Binkowski, Johan Bjork, David Black,
|
||||||
|
Tymoteusz Blazejczyk, Daniel Bone, Morten Borup Petersen, Gregg Bouchard,
|
||||||
|
Christopher Boumenot, Nick Bowler, Byron Bradley, Bryan Brady, Charlie
|
||||||
|
Brej, J Briquet, Lane Brooks, John Brownlee, Jeff Bush, Lawrence Butcher,
|
||||||
|
Tony Bybell, Iru Cai, Ted Campbell, Chris Candler, Lauren Carlson, Donal
|
||||||
|
Casey, Alex Chadwick, Terry Chen, Yi-Chung Chen, Enzo Chi, Robert A. Clark,
|
||||||
|
Ryan Clarke, Allan Cochrane, John Coiner, Gianfranco Costamagna, Sean
|
||||||
|
Cross, George Cuan, Joe DErrico, Lukasz Dalek, Gunter Dannoritzer, Ashutosh
|
||||||
|
Das, Maarten De Braekeleer, Bernard Deadman, Alberto Del Rio, John Demme,
|
||||||
|
Mike Denio, John Deroo, Philip Derrick, John Dickol, Ruben Diez, Danny
|
||||||
|
Ding, Jacko Dirks, Ivan Djordjevic, Jonathon Donaldson, Sebastian Dressler,
|
||||||
|
Alex Duller, Jeff Dutton, Tomas Dzetkulic, Richard E George, Edgar
|
||||||
|
E. Iglesias, Usuario Eda, Charles Eddleston, Chandan Egbert, Jan Egil Ruud,
|
||||||
|
Joe Eiler, Ahmed El-Mahmoudy, Trevor Elbourne, Mats Engstrom, Charles Eric
|
||||||
|
LaForest, Robert Farrell, Eugen Fekete, Fabrizio Ferrandi, Udi Finkelstein,
|
||||||
|
Brian Flachs, Andrea Foletto, Bob Fredieu, Duane Galbi, Benjamin Gartner,
|
||||||
|
Christian Gelinek, Peter Gerst, Glen Gibb, Michael Gielda, Barbara Gigerl,
|
||||||
|
Shankar Giri, Dan Gisselquist, Petr Gladkikh, Sam Gladstone, Andrew
|
||||||
|
Goessling, Amir Gonnen, Chitlesh Goorah, Tomasz Gorochowik, Kai Gossner,
|
||||||
|
Sergi Granell, Al Grant, Alexander Grobman, Xuan Guo, Driss Hafdi, Neil
|
||||||
|
Hamilton, James Hanlon, Oyvind Harboe, Jannis Harder, Junji Hashimoto,
|
||||||
|
Thomas Hawkins, Mitch Hayenga, Harald Heckmann, Robert Henry, Stephen
|
||||||
|
Henry, David Hewson, Jamey Hicks, Joel Holdsworth, Andrew Holme, Hiroki
|
||||||
|
Honda, Alex Hornung, Pierre-Henri Horrein, David Horton, Peter Horvath, Jae
|
||||||
|
Hossell, Kuoping Hsu, Alan Hunter, James Hutchinson, Anderson Ignacio da
|
||||||
|
Silva, Jamie Iles, Thomas J Whatson, Ben Jackson, Mark Jackson Pulver,
|
||||||
|
Shareef Jalloq, Marlon James, Krzysztof Jankowski, HyungKi Jeong, Iztok
|
||||||
|
Jeras, James Johnson, Christophe Joly, Franck Jullien, James Jung, Mike
|
||||||
|
Kagen, Arthur Kahlich, Kaalia Kahn, Guy-Armand Kamendje, Vasu Kandadi,
|
||||||
|
Kanad Kanhere, Patricio Kaplan, Pieter Kapsenberg, Rafal Kapuscik, Ralf
|
||||||
|
Karge, Dan Katz, Sol Katzman, Ian Kennedy, Michael Killough, Jonathan
|
||||||
|
Kimmitt, Olof Kindgren, Kevin Kiningham, Dan Kirkham, Sobhan Klnv, Gernot
|
||||||
|
Koch, Jack Koenig, Soon Koh, Nathan Kohagen, Steve Kolecki, Brett Koonce,
|
||||||
|
Will Korteland, Wojciech Koszek, Varun Koyyalagunta, Markus Krause, David
|
||||||
|
Kravitz, Roland Kruse, Andreas Kuster, Sergey Kvachonok, Ed Lander, Steve
|
||||||
|
Lang, Stephane Laurent, Walter Lavino, Christian Leber, Larry Lee, Igor
|
||||||
|
Lesik, John Li, Eivind Liland, Charlie Lind, Andrew Ling, Jiuyang Liu, Paul
|
||||||
|
Liu, Derek Lockhart, Jake Longo, Geza Lore, Arthur Low, Stefan Ludwig, Dan
|
||||||
|
Lussier, Fred Ma, Duraid Madina, Odd Magne Reitan, Affe Mao, Julien
|
||||||
|
Margetts, Mark Marshall, Alfonso Martinez, Unai Martinez-Corral, Yves
|
||||||
|
Mathieu, Patrick Maupin, Conor McCullough, Jason McMullan, Elliot Mednick,
|
||||||
|
Wim Michiels, Miodrag Milanovic, Peter Monsson, Sean Moore, Dennis
|
||||||
|
Muhlestein, John Murphy, Matt Myers, Nathan Myers, Richard Myers, Dimitris
|
||||||
|
Nalbantis, Peter Nelson, Bob Newgard, Paul Nitza, Yossi Nivin, Pete Nixon,
|
||||||
|
Lisa Noack, Mark Nodine, Kuba Ober, Andreas Olofsson, Baltazar Ortiz,
|
||||||
|
Aleksander Osman, Don Owen, James Pallister, Vassilis Papaefstathiou, Brad
|
||||||
|
Parker, Dan Petrisko, Maciej Piechotka, David Pierce, Cody Piersall,
|
||||||
|
Dominic Plunkett, David Poole, Mike Popoloski, Roman Popov, Rich Porter,
|
||||||
|
Niranjan Prabhu, Usha Priyadharshini, Prateek Puri, Marshal Qiao, Nandu
|
||||||
|
Raj, Danilo Ramos, Chris Randall, Anton Rapp, Josh Redford, Frederic
|
||||||
|
Requin, Dustin Richmond, Samuel Riedel, Eric Rippey, Oleg Rodionov, Ludwig
|
||||||
|
Rogiers, Paul Rolfe, Arjen Roodselaar, Tobias Rosenkranz, Huang Rui, Denis
|
||||||
|
Rystsov, John Sanguinetti, Galen Seitz, Joseph Shaker, Salman Sheikh, Yu
|
||||||
|
Sheng Lin, Hao Shi, Mike Shinkarovsky, Rafael Shirakawa, Jeffrey Short, Fan
|
||||||
|
Shupei, Rodney Sinclair, Steven Slatter, Brian Small, Garrett Smith, Tim
|
||||||
|
Snyder, Wilson Snyder, Maciej Sobkowski, Stan Sokorac, Alex Solomatnikov,
|
||||||
|
Wei Song, Art Stamness, David Stanford, John Stevenson, Pete Stevenson,
|
||||||
|
Patrick Stewart, Rob Stoddard, Todd Strader, John Stroebel, Sven Stucki,
|
||||||
|
Howard Su, Emerson Suguimoto, Gene Sullivan, Wai Sum Mong, Qingyao Sun,
|
||||||
|
Renga Sundararajan, Rupert Swarbrick, Yutetsu Takatsukasa, Thierry Tambe,
|
||||||
|
Drew Taussig, Peter Tengstrand, Wesley Terpstra, Rui Terra, Stefan Thiede,
|
||||||
|
Gary Thomas, Ian Thompson, Kevin Thompson, Mike Thyer, Hans Tichelaar,
|
||||||
|
Viktor Tomov, Steve Tong, Alex Torregrosa, Michael Tresidder, David Turner,
|
||||||
|
Neil Turton, Cong Van Nguyen, Hans Van Antwerpen, Jan Van Winkel, Sebastien
|
||||||
|
Van Cauwenberghe, Laurens van Dam, Leendert van Doorn, Srini Vemuri, Yuri
|
||||||
|
Victorovich, Bogdan Vukobratovic, Holger Waechtler, Philipp Wagner, Stefan
|
||||||
|
Wallentowitz, Shawn Wang, Paul Wasson, Greg Waters, Thomas Watts, Eugene
|
||||||
|
Weber, David Welch, Martin Whitaker, Marco Widmer, Leon Wildman, Daniel
|
||||||
|
Wilkerson, Gerald Williams, Trevor Williams, Jeff Winston, Joshua Wise,
|
||||||
|
Clifford Wolf, Tobias Wolfel, Johan Wouters, Paul Wright, Junyi Xi, Ding
|
||||||
|
Xiaoliang, Jie Xu, Mandy Xu, Yinan Xu, Luke Yang, Amir Yazdanbakhsh, and
|
||||||
|
Keyi Zhang.
|
||||||
|
|
||||||
|
Thanks to them, and all those we've missed including above, or wished to
|
||||||
|
remain anonymous.
|
||||||
|
|
||||||
|
Historical Origins
|
||||||
|
==================
|
||||||
|
|
||||||
|
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
|
||||||
|
was then merged with a C based CPU model of the Alpha processor and
|
||||||
|
simulated in a C based environment called CCLI.
|
||||||
|
|
||||||
|
In 1995 Verilator started being used also for Multimedia and Network
|
||||||
|
Processor development inside Digital. Duane Galbi took over active
|
||||||
|
development of Verilator, and added several performance enhancements. CCLI
|
||||||
|
was still being used as the shell.
|
||||||
|
|
||||||
|
In 1998, through the efforts of existing DECies, mainly Duane Galbi,
|
||||||
|
Digital graciously agreed to release the source code. (Subject to the code
|
||||||
|
not being resold, which is compatible with the GNU Public License.)
|
||||||
|
|
||||||
|
In 2001, Wilson Snyder took the kit, and added a SystemC mode, and called
|
||||||
|
it Verilator2. This was the first packaged public release.
|
||||||
|
|
||||||
|
In 2002, Wilson Snyder created Verilator 3.000 by rewriting Verilator from
|
||||||
|
scratch in C++. This added many optimizations, yielding about a 2-5x
|
||||||
|
performance gain.
|
||||||
|
|
||||||
|
In 2009, major SystemVerilog and DPI language support was added.
|
||||||
|
|
||||||
|
In 2018, Verilator 4.000 was released with multithreaded support.
|
||||||
|
|
||||||
|
In 2019, Verilator joined the `CHIPS Alliance
|
||||||
|
<https://chipsalliance.org>`_.
|
||||||
|
|
||||||
|
Currently, various language features and performance enhancements are added
|
||||||
|
as the need arises. Verilator is now about 3x faster than in 2002, and is
|
||||||
|
faster than most (if not every) other simulator.
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
*********
|
||||||
|
Copyright
|
||||||
|
*********
|
||||||
|
|
||||||
|
The latest version of Verilator is available from `https://verilator.org
|
||||||
|
<https://verilator.org>`_.
|
||||||
|
|
||||||
|
Copyright 2003-2021 by Wilson Snyder. This program is free software; you
|
||||||
|
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
|
||||||
|
Artistic License Version 2.0.
|
||||||
|
|
||||||
|
All Verilog and C++/SystemC code quoted within this documentation file are
|
||||||
|
released as Creative Commons Public Domain (CC0). Many example files and
|
||||||
|
test files are likewise released under CC0 into effectively the Public
|
||||||
|
Domain as described in the files themselves.
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
Deprecations
|
||||||
|
============
|
||||||
|
|
||||||
|
The following deprecated items are scheduled for future removal:
|
||||||
|
|
||||||
|
C++11 compiler support
|
||||||
|
Verilator currently requires C++11 or newer compilers. Verilator will
|
||||||
|
require C++14 or newer compilers for both compiling Verilator and
|
||||||
|
compiling Verilated models no sooner than January 2022.
|
||||||
|
|
||||||
|
Configuration File -msg
|
||||||
|
The :vlopt:`lint_off` "-msg" option has been replaced with the "-rule"
|
||||||
|
option. "-msg" is planned for removal no sooner than January 2021.
|
||||||
|
|
||||||
|
XML locations
|
||||||
|
The XML "fl" attribute has been replaced with the "loc" attribute. "fl"
|
||||||
|
is planned for removal no sooner than January 2021.
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
Environment
|
||||||
|
===========
|
||||||
|
|
||||||
|
This section describes the environment variables used by Verilator and
|
||||||
|
associated programs.
|
||||||
|
|
||||||
|
.. option:: LD_LIBRARY_PATH
|
||||||
|
|
||||||
|
A generic Linux/OS variable specifying what directories have shared
|
||||||
|
object (.so) files. This path should include SystemC and any other
|
||||||
|
shared objects needed at simulation runtime.
|
||||||
|
|
||||||
|
.. option:: MAKE
|
||||||
|
|
||||||
|
Names the executable of the make command invoked when using the
|
||||||
|
:vlopt:`--build` option. Some operating systems may require "gmake" to
|
||||||
|
this variable to launch GNU make. If this variable is not specified,
|
||||||
|
"make" is used.
|
||||||
|
|
||||||
|
.. option:: OBJCACHE
|
||||||
|
|
||||||
|
Optionally specifies a caching or distribution program to place in front
|
||||||
|
of all runs of the C++ compiler. For example, "ccache". If using
|
||||||
|
:command:`distcc` or :command:`icecc`/:command:`icecream`, they would
|
||||||
|
generally be run under :command:`ccache`; see the documentation for
|
||||||
|
those programs. If OBJCACHE is not set, and at configure time ccache
|
||||||
|
was present, ccache will be used as a default.
|
||||||
|
|
||||||
|
.. option:: SYSTEMC
|
||||||
|
|
||||||
|
Deprecated. Used only if :option:`SYSTEMC_INCLUDE` or
|
||||||
|
:option:`SYSTEMC_LIBDIR` is not set. If set, specifies the directory
|
||||||
|
containing the SystemC distribution. If not specified, it will come
|
||||||
|
from a default optionally specified at configure time (before Verilator
|
||||||
|
was compiled).
|
||||||
|
|
||||||
|
.. option:: SYSTEMC_ARCH
|
||||||
|
|
||||||
|
Deprecated. Used only if :option:`SYSTEMC_LIBDIR` is not set.
|
||||||
|
Specifies the architecture name used by the SystemC kit. This is the
|
||||||
|
part after the dash in the "lib-{...}" directory name created by a
|
||||||
|
:command:`make` in the SystemC distribution. If not set, Verilator will
|
||||||
|
try to intuit the proper setting, or use the default optionally
|
||||||
|
specified at configure time (before Verilator was compiled).
|
||||||
|
|
||||||
|
.. option:: SYSTEMC_CXX_FLAGS
|
||||||
|
|
||||||
|
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
|
||||||
|
"-pthread".
|
||||||
|
|
||||||
|
.. option:: SYSTEMC_INCLUDE
|
||||||
|
|
||||||
|
If set, specifies the directory containing the systemc.h header file. If
|
||||||
|
not specified, it will come from a default optionally specified at
|
||||||
|
configure time (before Verilator was compiled), or computed from
|
||||||
|
SYSTEMC/include.
|
||||||
|
|
||||||
|
.. option:: SYSTEMC_LIBDIR
|
||||||
|
|
||||||
|
If set, specifies the directory containing the libsystemc.a library. If
|
||||||
|
not specified, it will come from a default optionally specified at
|
||||||
|
configure time (before Verilator was compiled), or computed from
|
||||||
|
SYSTEMC/lib-SYSTEMC_ARCH.
|
||||||
|
|
||||||
|
.. option:: VERILATOR_BIN
|
||||||
|
|
||||||
|
If set, specifies an alternative name of the ``verilator`` binary. May
|
||||||
|
be used for debugging and selecting between multiple operating system
|
||||||
|
builds.
|
||||||
|
|
||||||
|
.. option:: VERILATOR_COVERAGE_BIN
|
||||||
|
|
||||||
|
If set, specifies an alternative name of the ``verilator_coverage``
|
||||||
|
binary. May be used for debugging and selecting between multiple
|
||||||
|
operating system builds.
|
||||||
|
|
||||||
|
.. option:: VERILATOR_GDB
|
||||||
|
|
||||||
|
If set, the command to run when using the :vlopt:`--gdb` option, such as
|
||||||
|
"ddd". If not specified, it will use "gdb".
|
||||||
|
|
||||||
|
.. option:: VERILATOR_ROOT
|
||||||
|
|
||||||
|
Specifies the directory containing the distribution kit. This is used
|
||||||
|
to find the executable, Perl library, and include files. If not
|
||||||
|
specified, it will come from a default optionally specified at configure
|
||||||
|
time (before Verilator was compiled). It should not be specified if
|
||||||
|
using a pre-compiled Verilator package as the hard-coded value should be
|
||||||
|
correct. See :ref:`Installation`.
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Example C++ Execution:
|
||||||
|
|
||||||
|
Example C++ Execution
|
||||||
|
=====================
|
||||||
|
|
||||||
|
We'll compile this example into C++. For an extended and commented version
|
||||||
|
of what this C++ code is doing, see
|
||||||
|
:file:`examples/make_tracing_c/sim_main.cpp` in the distribution.
|
||||||
|
|
||||||
|
.. include:: example_common_install.rst
|
||||||
|
|
||||||
|
Now, let's create an example Verilog, and C++ wrapper file:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
mkdir test_our
|
||||||
|
cd test_our
|
||||||
|
|
||||||
|
cat >our.v <<'EOF'
|
||||||
|
module our;
|
||||||
|
initial begin $display("Hello World"); $finish; end
|
||||||
|
endmodule
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >sim_main.cpp <<'EOF'
|
||||||
|
#include "Vour.h"
|
||||||
|
#include "verilated.h"
|
||||||
|
int main(int argc, char** argv, char** env) {
|
||||||
|
VerilatedContext* contextp = new VerilatedContext;
|
||||||
|
contextp->commandArgs(argc, argv);
|
||||||
|
Vour* top = new Vour{contextp};
|
||||||
|
while (!contextp->gotFinish()) { top->eval(); }
|
||||||
|
delete top;
|
||||||
|
delete contextp;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
Now we run Verilator on our little example.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
verilator -Wall --cc --exe --build sim_main.cpp our.v
|
||||||
|
|
||||||
|
Breaking this command down:
|
||||||
|
|
||||||
|
#. :vlopt:`-Wall` so Verilator has stronger lint warnings
|
||||||
|
enabled.
|
||||||
|
|
||||||
|
#. :vlopt:`--cc` to get C++ output (versus e.g. SystemC
|
||||||
|
or only linting).
|
||||||
|
|
||||||
|
#. :vlopt:`--exe`, along with our :command:`sim_main.cpp` wrapper file, so
|
||||||
|
the build will create an executable instead of only a library.
|
||||||
|
|
||||||
|
#. :vlopt:`--build` so Verilator will call make itself. This is we don't
|
||||||
|
need to manually call make as a separate step. You can also write your
|
||||||
|
own compile rules, and run make yourself as we show in :ref:`Example
|
||||||
|
SystemC Execution`.)
|
||||||
|
|
||||||
|
#. An finally, :command:`our.v` which is our SystemVerilog design file.
|
||||||
|
|
||||||
|
Once Verilator completes we can see the generated C++ code under the
|
||||||
|
:file:`obj_dir` directory.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
ls -l obj_dir
|
||||||
|
|
||||||
|
(See :ref:`Files Read/Written` for descriptions of some of the files that
|
||||||
|
were created.)
|
||||||
|
|
||||||
|
And now we run it:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
obj_dir/Vour
|
||||||
|
|
||||||
|
And we get as output:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
Hello World
|
||||||
|
- our.v:2: Verilog $finish
|
||||||
|
|
||||||
|
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.
|
||||||
|
To aid this Verilator can create a makefile dependency file. For examples
|
||||||
|
that do this see the :file:`examples` directory in the distribution.
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
First you need Verilator installed, see :ref:`Installation`. In brief, if
|
||||||
|
you installed Verilator using the package manager of your operating system,
|
||||||
|
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
|
||||||
|
VERILATOR_ROOT set. However, if you installed Verilator from sources and
|
||||||
|
want to run Verilator out of where you compiled Verilator, you need to
|
||||||
|
point to the kit:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# See above; don't do this if using an OS-distributed Verilator
|
||||||
|
export VERILATOR_ROOT=/path/to/where/verilator/was/installed
|
||||||
|
export PATH=$VERILATOR_ROOT/bin:$PATH
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Examples in the Distribution:
|
||||||
|
|
||||||
|
Examples in the Distribution
|
||||||
|
============================
|
||||||
|
|
||||||
|
See the ``examples/`` directory that is part of the distribution, and
|
||||||
|
is installed (in a OS-specific place, often in e.g.
|
||||||
|
``/usr/local/share/verilator/examples``). These examples include:
|
||||||
|
|
||||||
|
examples/make_hello_c
|
||||||
|
Example GNU-make simple Verilog->C++ conversion
|
||||||
|
examples/make_hello_sc
|
||||||
|
Example GNU-make simple Verilog->SystemC conversion
|
||||||
|
examples/make_tracing_c
|
||||||
|
Example GNU-make Verilog->C++ with tracing
|
||||||
|
examples/make_tracing_sc
|
||||||
|
Example GNU-make Verilog->SystemC with tracing
|
||||||
|
examples/make_protect_lib
|
||||||
|
Example using --protect-lib
|
||||||
|
examples/cmake_hello_c
|
||||||
|
Example building make_hello_c with CMake
|
||||||
|
examples/cmake_hello_sc
|
||||||
|
Example building make_hello_sc with CMake
|
||||||
|
examples/cmake_tracing_c
|
||||||
|
Example building make_tracing_c with CMake
|
||||||
|
examples/cmake_tracing_sc
|
||||||
|
Example building make_tracing_sc with CMake
|
||||||
|
examples/cmake_protect_lib
|
||||||
|
Example building make_protect_lib with CMake
|
||||||
|
|
||||||
|
To run an example copy the example to a new directory and run it.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
cp -rp {path_to}/examples/make_hello_c make_hello_c
|
||||||
|
cd make_hello_c
|
||||||
|
make
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Example SystemC Execution:
|
||||||
|
|
||||||
|
Example SystemC Execution
|
||||||
|
=========================
|
||||||
|
|
||||||
|
This is an example similar to the :ref:`Example C++ Execution`, but using
|
||||||
|
SystemC. We'll also explicitly run make.
|
||||||
|
|
||||||
|
.. include:: example_common_install.rst
|
||||||
|
|
||||||
|
Now, let's create an example Verilog, and SystemC wrapper file:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
mkdir test_our_sc
|
||||||
|
cd test_our_sc
|
||||||
|
|
||||||
|
cat >our.v <<'EOF'
|
||||||
|
module our (clk);
|
||||||
|
input clk; // Clock is required to get initial activation
|
||||||
|
always @(posedge clk)
|
||||||
|
begin $display("Hello World"); $finish; end
|
||||||
|
endmodule
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat >sc_main.cpp <<'EOF'
|
||||||
|
#include "Vour.h"
|
||||||
|
int sc_main(int argc, char** argv) {
|
||||||
|
Verilated::commandArgs(argc, argv);
|
||||||
|
sc_clock clk{"clk", 10, SC_NS, 0.5, 3, SC_NS, true};
|
||||||
|
Vour* top = new Vour{"top"};
|
||||||
|
top->clk(clk);
|
||||||
|
while (!Verilated::gotFinish()) { sc_start(1, SC_NS); }
|
||||||
|
delete top;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
Now we run Verilator on our little example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
verilator -Wall --sc --exe sc_main.cpp our.v
|
||||||
|
|
||||||
|
This example does not use --build, therefore we need to explicitly compile
|
||||||
|
it:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
make -j -C obj_dir -f Vour.mk Vour
|
||||||
|
|
||||||
|
And now we run it:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
obj_dir/Vour
|
||||||
|
|
||||||
|
And we get, after the SystemC banner, the same output as the C++ example:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
SystemC 2.3.3-Accellera
|
||||||
|
|
||||||
|
Hello World
|
||||||
|
- our.v:4: Verilog $finish
|
||||||
|
|
||||||
|
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.
|
||||||
|
For examples that do this see the :file:`examples` directory in the
|
||||||
|
distribution.
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Examples:
|
||||||
|
|
||||||
|
========
|
||||||
|
Examples
|
||||||
|
========
|
||||||
|
|
||||||
|
This section covers the following examples:
|
||||||
|
|
||||||
|
* :ref:`Example C++ Execution`
|
||||||
|
* :ref:`Example SystemC Execution`
|
||||||
|
* :ref:`Examples in the Distribution`
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
example_cc.rst
|
||||||
|
example_sc.rst
|
||||||
|
example_dist.rst
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Simulation Runtime Arguments:
|
||||||
|
|
||||||
|
Simulation Runtime Arguments
|
||||||
|
============================
|
||||||
|
|
||||||
|
The following are the arguments that may be passed to a Verilated
|
||||||
|
executable, provided that executable calls
|
||||||
|
:code:`Verilated::commandArgs()`.
|
||||||
|
|
||||||
|
All simulation runtime arguments begin with "+verilator", so that the
|
||||||
|
user's executable may skip over all "+verilator" arguments when parsing its
|
||||||
|
command line.
|
||||||
|
|
||||||
|
Summary:
|
||||||
|
|
||||||
|
.. include:: ../_build/gen/args_verilated.rst
|
||||||
|
|
||||||
|
|
||||||
|
.. option:: +verilator+debug
|
||||||
|
|
||||||
|
Enable simulation runtime debugging. Equivalent to
|
||||||
|
:vlopt:`+verilator+debugi+4 <+verilator+debugi+\<value\>>`.
|
||||||
|
|
||||||
|
.. option:: +verilator+debugi+<value>
|
||||||
|
|
||||||
|
Enable simulation runtime debugging at the provided level.
|
||||||
|
|
||||||
|
.. option:: +verilator+error+limit+<value>
|
||||||
|
|
||||||
|
Set number of non-fatal errors (e.g. assertion failures) before exiting
|
||||||
|
simulation runtime. Also affects number of $stop calls needed before
|
||||||
|
exit. Defaults to 1.
|
||||||
|
|
||||||
|
.. option:: +verilator+help
|
||||||
|
|
||||||
|
Display help and exit.
|
||||||
|
|
||||||
|
.. option:: +verilator+prof+threads+file+<filename>
|
||||||
|
|
||||||
|
When a model was Verilated using :vlopt:`--prof-threads`, sets the
|
||||||
|
simulation runtime filename to dump to. Defaults to
|
||||||
|
:file:`profile_threads.dat`.
|
||||||
|
|
||||||
|
.. option:: +verilator+prof+threads+start+<value>
|
||||||
|
|
||||||
|
When a model was Verilated using :vlopt:`--prof-threads`, the simulation
|
||||||
|
runtime will wait until $time is at this value (expressed in units of
|
||||||
|
the time precision), then start the profiling warmup, then
|
||||||
|
capturing. Generally this should be set to some time that is well within
|
||||||
|
the normal operation of the simulation, i.e. outside of reset. If 0, the
|
||||||
|
dump is disabled. Defaults to 1.
|
||||||
|
|
||||||
|
.. option:: +verilator+prof+threads+window+<value>
|
||||||
|
|
||||||
|
When a model was Verilated using :vlopt:`--prof-threads`, after $time
|
||||||
|
reaches :vlopt:`+verilator+prof+threads+start+\<value\>`, Verilator will
|
||||||
|
warm up the profiling for this number of eval() calls, then will capture
|
||||||
|
the profiling of this number of eval() calls. Defaults to 2, which
|
||||||
|
makes sense for a single-clock-domain module where it's typical to want
|
||||||
|
to capture one posedge eval() and one negedge eval().
|
||||||
|
|
||||||
|
.. option:: +verilator+rand+reset+<value>
|
||||||
|
|
||||||
|
When a model was Verilated using :vlopt:`--x-initial unique
|
||||||
|
<--x-initial>`, sets the simulation runtime initialization technique. 0
|
||||||
|
= Reset to zeros. 1 = Reset to all-ones. 2 = Randomize. See
|
||||||
|
:ref:`Unknown States`.
|
||||||
|
|
||||||
|
.. option:: +verilator+seed+<value>
|
||||||
|
|
||||||
|
For $random and :vlopt:`--x-initial unique <--x-initial>`, set the
|
||||||
|
simulation runtime random seed value. If zero or not specified picks a
|
||||||
|
value from the system random number generator.
|
||||||
|
|
||||||
|
.. option:: +verilator+noassert
|
||||||
|
|
||||||
|
Disable assert checking per runtime argument. This is the same as
|
||||||
|
calling :code:`Verilated::assertOn(false)` in the model.
|
||||||
|
|
||||||
|
.. option:: +verilator+V
|
||||||
|
|
||||||
|
Shows the verbose version, including configuration information.
|
||||||
|
|
||||||
|
.. option:: +verilator+version
|
||||||
|
|
||||||
|
Displays program version and exits.
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,114 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
verilator_coverage
|
||||||
|
==================
|
||||||
|
|
||||||
|
Verilator_coverage processes Verilated model-generated coverage reports.
|
||||||
|
|
||||||
|
With --annotate, it reads the specified coverage data file and generates
|
||||||
|
annotated source code with coverage metrics annotated. If multiple
|
||||||
|
coverage points exist on the same source code line, additional lines will
|
||||||
|
be inserted to report the additional points.
|
||||||
|
|
||||||
|
Additional Verilog-XL-style standard arguments specify the search paths
|
||||||
|
necessary to find the source code that the coverage analysis was performed
|
||||||
|
on.
|
||||||
|
|
||||||
|
To filter those items to be included in coverage, you may read
|
||||||
|
logs/coverage.dat into an editor and do a M-x keep-lines to include only
|
||||||
|
those statistics of interest and save to a new .dat file.
|
||||||
|
|
||||||
|
For Verilog conditions that should never occur, either add a $stop
|
||||||
|
statement to the appropriate statement block, or see
|
||||||
|
:option:`/*verilator&32;coverage_off*/`. This will remove the coverage
|
||||||
|
points after the model is re-Verilated.
|
||||||
|
|
||||||
|
For an overview of use of verilator_coverage, see :ref:`Coverage Analysis`.
|
||||||
|
|
||||||
|
|
||||||
|
verilator_coverage Example Usage
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
..
|
||||||
|
|
||||||
|
verilator_coverage --help
|
||||||
|
verilator_coverage --version
|
||||||
|
|
||||||
|
verilator_coverage --annotate <obj>
|
||||||
|
|
||||||
|
verilator_coverage -write merged.dat -read <datafiles>...
|
||||||
|
|
||||||
|
verilator_coverage -write-info merged.info -read <datafiles>...
|
||||||
|
|
||||||
|
|
||||||
|
verilator_coverage Arguments
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
.. program:: verilator_coverage
|
||||||
|
|
||||||
|
.. option:: <filename>
|
||||||
|
|
||||||
|
Specifies the input coverage data file. Multiple filenames may be provided
|
||||||
|
to read multiple inputs. If no data file is specified, by default
|
||||||
|
"coverage.dat" will be read.
|
||||||
|
|
||||||
|
.. option:: --annotate <output_directory>
|
||||||
|
|
||||||
|
Specifies the directory name that source files with annotated coverage data
|
||||||
|
should be written to.
|
||||||
|
|
||||||
|
.. option:: --annotate-all
|
||||||
|
|
||||||
|
Specifies all files should be shown. By default, only those source files
|
||||||
|
which have low coverage are written to the output directory.
|
||||||
|
|
||||||
|
.. option:: --annotate-min <count>
|
||||||
|
|
||||||
|
Specifies if the coverage point does not include the count number of
|
||||||
|
coverage hits, then the coverage point will be considered above the
|
||||||
|
threashold, and the coverage report will put a "%" to indicate the coverage
|
||||||
|
is not sufficient. Defaults to 10.
|
||||||
|
|
||||||
|
.. option:: --help
|
||||||
|
|
||||||
|
Displays a help summary, the program version, and exits.
|
||||||
|
|
||||||
|
.. option:: --rank
|
||||||
|
|
||||||
|
Prints an experimental report listing the relative importance of each test
|
||||||
|
in covering all of the coverage points. The report shows "Covered" which
|
||||||
|
indicates the number of points that test covers; a test is considered to
|
||||||
|
cover a point if it has a bucket count of at least 1. The "rank" column has
|
||||||
|
a higher number t indicate the test is more important, and rank 0 means the
|
||||||
|
test does not need to be run to cover the points. "RankPts" indicates the
|
||||||
|
number of coverage points this test will contribute to overall coverage if
|
||||||
|
all tests are run in the order of highest to lowest rank.
|
||||||
|
|
||||||
|
.. option:: --unlink
|
||||||
|
|
||||||
|
With :option:`--write`, unlink all input files after the output
|
||||||
|
has been successfully created.
|
||||||
|
|
||||||
|
.. option:: --version
|
||||||
|
|
||||||
|
Displays program version and exits.
|
||||||
|
|
||||||
|
.. option:: --write <filename>
|
||||||
|
|
||||||
|
Specifies the aggregate coverage results, summed across all the files,
|
||||||
|
should be written to the given filename in verilator_coverage data format.
|
||||||
|
This is useful for use in scripts to combine many coverage data files
|
||||||
|
(likely generated from random test runs) into one master coverage file.
|
||||||
|
|
||||||
|
.. option:: --write-info <filename.info>
|
||||||
|
|
||||||
|
Specifies the aggregate coverage results, summed across all the files,
|
||||||
|
should be written to the given filename in :command:`lcov` .info format.
|
||||||
|
This may be used to feed into :command:`lcov` to aggregate or generate
|
||||||
|
reports.
|
||||||
|
|
||||||
|
The info format loses data compared to the Verilator coverage data format;
|
||||||
|
the info will all forms of coverage converted to line style coverage, and
|
||||||
|
if there are multiple coverage points on a single line, the minimum
|
||||||
|
coverage across those points will be used to report coverage of the line.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
verilator_gantt
|
||||||
|
===============
|
||||||
|
|
||||||
|
Verilator_gantt creates a visual representation to help analyze Verilator
|
||||||
|
multithreaded simulation performance, by showing when each macro-task
|
||||||
|
starts and ends, and showing when each thread is busy or idle.
|
||||||
|
|
||||||
|
For an overview of use of verilator_gantt, see :ref:`Profiling`.
|
||||||
|
|
||||||
|
Gantt Chart Contents
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The generated Gantt chart has time on the X-axis. Times shown are to the
|
||||||
|
scale printed, i.e. a certain about of time for each character width. The
|
||||||
|
Y-axis shows threads, each thread's execution is shown on one line. That
|
||||||
|
line shows "[" at the position in time when it executes.
|
||||||
|
|
||||||
|
Following the "[" is the CPU number the task executed on, followed by zero
|
||||||
|
or more "-" to make the width of the characters match the scaled execution
|
||||||
|
time, followed by a "]". If the scale is too small, the CPU number and
|
||||||
|
mtask number will not be printed. If the scale is very small, a "&"
|
||||||
|
indicates multiple mtasks started at that time position.
|
||||||
|
|
||||||
|
Also creates a value change dump (VCD) format dump file which may be viewed
|
||||||
|
in a waveform viewer (e.g. C<GTKWave>). See below.
|
||||||
|
|
||||||
|
Gantt Chart VCD Signals
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
In waveforms there are the following signals. Most signals the "decimal"
|
||||||
|
format will remove the leading zeros and make the traces easier to read.
|
||||||
|
|
||||||
|
parallelism
|
||||||
|
The number of mtasks active at this time, for best performance this will
|
||||||
|
match the thread count. You may want to use an "analog step" format to
|
||||||
|
view this signal.
|
||||||
|
|
||||||
|
cpu#_thread
|
||||||
|
For the given CPU number, the thread number executing.
|
||||||
|
|
||||||
|
mtask#_cpu
|
||||||
|
For the given mtask id, the CPU it is executing on.
|
||||||
|
|
||||||
|
thread#_mtask
|
||||||
|
For the given thread number, the mtask id executing.
|
||||||
|
|
||||||
|
verilator_gantt Arguments
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
.. program:: verilator_gantt
|
||||||
|
|
||||||
|
.. option:: <filename>
|
||||||
|
|
||||||
|
The filename to read data from, defaults to "profile_threads.dat".
|
||||||
|
|
||||||
|
.. option:: --help
|
||||||
|
|
||||||
|
Displays a help summary, the program version, and exits.
|
||||||
|
|
||||||
|
.. option:: --scale <n>
|
||||||
|
|
||||||
|
Sets the number of time units per character on the X-axis of the generated
|
||||||
|
Gantt chart. (On x86, time units are rdtsc ticks.) Defaults to 0, which
|
||||||
|
will automatically compute a reasonable scale where no two mtasks need to
|
||||||
|
fit into same character width's worth of scaled time.
|
||||||
|
|
||||||
|
.. option:: --no-vcd
|
||||||
|
|
||||||
|
Disables creating a .vcd file.
|
||||||
|
|
||||||
|
.. option:: --vcd <filename>
|
||||||
|
|
||||||
|
Sets the output filename for vcd dump. Default is "verilator_gantt.vcd".
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
verilator_profcfuncs
|
||||||
|
====================
|
||||||
|
|
||||||
|
Verilator_profcfunc reads a profile report created by gprof. The names of
|
||||||
|
the functions are then transformed, assuming the user used Verilator's
|
||||||
|
--prof-cfuncs, and a report printed showing the percentage of time, etc, in
|
||||||
|
each Verilog block.
|
||||||
|
|
||||||
|
For an overview of use of verilator_profcfuncs, see :ref:`Profiling`.
|
||||||
|
|
||||||
|
verilator_profcfuncs Arguments
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
.. program:: verilator_profcfuncs
|
||||||
|
|
||||||
|
.. option:: <filename>
|
||||||
|
|
||||||
|
The :command:`gprof`-generated filename to read data from. Typically "gprof.out".
|
||||||
|
|
||||||
|
.. option:: --help
|
||||||
|
|
||||||
|
Displays a help summary, the program version, and exits.
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
*********************************
|
||||||
|
Executable and Argument Reference
|
||||||
|
*********************************
|
||||||
|
|
||||||
|
This section describes the executables that are part of Verilator, and the
|
||||||
|
options to each executable.
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:hidden:
|
||||||
|
|
||||||
|
exe_verilator.rst
|
||||||
|
exe_verilator_coverage.rst
|
||||||
|
exe_verilator_gantt.rst
|
||||||
|
exe_verilator_profcfuncs.rst
|
||||||
|
exe_sim.rst
|
||||||
@@ -0,0 +1,495 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
*******************
|
||||||
|
Language Extensions
|
||||||
|
*******************
|
||||||
|
|
||||||
|
The following additional constructs are the extensions Verilator supports
|
||||||
|
on top of standard Verilog code. Using these features outside of comments
|
||||||
|
or "`ifdef`"'s may break other tools.
|
||||||
|
|
||||||
|
.. option:: `__FILE__
|
||||||
|
|
||||||
|
The :option:`\`__FILE__` define expands to the current filename as a
|
||||||
|
string, like C++'s __FILE__. This Verilator feature added in 2006 was
|
||||||
|
incorporated into the IEEE 1800-2009 standard.
|
||||||
|
|
||||||
|
.. option:: `__LINE__
|
||||||
|
|
||||||
|
The :option:`\`__LINE__` define expands to the current filename as a
|
||||||
|
string, like C++'s __LINE__. This Verilator feature added in 2006 was
|
||||||
|
incorporated into the IEEE 1800-2009 standard.
|
||||||
|
|
||||||
|
.. option:: `error [string]
|
||||||
|
|
||||||
|
This will report an error when encountered, like C++'s #error.
|
||||||
|
|
||||||
|
.. option:: $c([string], ...);
|
||||||
|
|
||||||
|
The string will be embedded directly in the output C++ code at the point
|
||||||
|
where the surrounding Verilog code is compiled. It may either be a
|
||||||
|
standalone statement (with a trailing ; in the string), or a function
|
||||||
|
that returns up to a 32-bit number (without a trailing ;). This can be
|
||||||
|
used to call C++ functions from your Verilog code.
|
||||||
|
|
||||||
|
String arguments will be put directly into the output C++ code, except
|
||||||
|
the word 'this' (i.e.: the object pointer) might be replaced with a
|
||||||
|
different pointer as Verilator might implement logic with non-member
|
||||||
|
functions. For this reason, any references to class members must be made
|
||||||
|
via an explicit 'this->' pointer dereference.
|
||||||
|
|
||||||
|
Expression arguments will have the code to evaluate the expression
|
||||||
|
inserted. Thus to call a C++ function, :code:`$c("func(",a,")")` will
|
||||||
|
result in :code:`func(a)` in the output C++ code. For input arguments,
|
||||||
|
rather than hard-coding variable names in the string
|
||||||
|
:code:`$c("func(a)")`, instead pass the variable as an expression
|
||||||
|
::code:`$c("func(",a,")")`. This will allow the call to work inside
|
||||||
|
Verilog functions where the variable is flattened out, and also enable
|
||||||
|
other optimizations.
|
||||||
|
|
||||||
|
If you will be reading or writing any Verilog variables inside the C++
|
||||||
|
functions, the Verilog signals must be declared with
|
||||||
|
:option:`/*verilator&32;public*/` metacomments.
|
||||||
|
|
||||||
|
You may also append an arbitrary number to $c, generally the width of
|
||||||
|
the output; :code:`signal_32_bits = $c32("...");`. This allows for
|
||||||
|
compatibility with other simulators which require a differently named
|
||||||
|
PLI function name for each different output width.
|
||||||
|
|
||||||
|
.. option:: $display, $write, $fdisplay, $fwrite, $sformat, $swrite
|
||||||
|
|
||||||
|
Format arguments may use C fprintf sizes after the % escape. Per the
|
||||||
|
Verilog standard, %x prints a number with the natural width, and %0x
|
||||||
|
prints a number with minimum width. Verilator extends this so %5x
|
||||||
|
prints 5 digits per the C standard (this is unspecified in Verilog, but
|
||||||
|
was incorporated into the 1800-2009).
|
||||||
|
|
||||||
|
.. option:: `coverage_block_off
|
||||||
|
|
||||||
|
Specifies the entire begin/end block should be ignored for coverage
|
||||||
|
analysis. Must be inside a code block, e.g. within a begin/end pair.
|
||||||
|
Same as :option:`coverage_block_off` in :ref:`Configuration Files`.
|
||||||
|
|
||||||
|
.. option:: `systemc_header
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into the output .h file's header. Must be placed as a module
|
||||||
|
item, e.g. directly inside a module/endmodule pair. Despite the name of
|
||||||
|
this macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
.. option:: `systemc_ctor
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into the C++ class constructor. Must be placed as a module
|
||||||
|
item, e.g. directly inside a module/endmodule pair. Despite the name of
|
||||||
|
this macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
.. option:: `systemc_dtor
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into the C++ class destructor. Must be placed as a module
|
||||||
|
item, e.g. directly inside a module/endmodule pair. Despite the name of
|
||||||
|
this macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
.. option:: `systemc_interface
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into the C++ class interface. Must be placed as a module item,
|
||||||
|
e.g. directly inside a module/endmodule pair. Despite the name of this
|
||||||
|
macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
.. option:: `systemc_imp_header
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into the header of all files for this C++ class implementation.
|
||||||
|
Must be placed as a module item, e.g. directly inside a module/endmodule
|
||||||
|
pair. Despite the name of this macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
.. option:: `systemc_implementation
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` or
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch and place it
|
||||||
|
verbatim into a single file of the C++ class implementation. Must be
|
||||||
|
placed as a module item, e.g. directly inside a module/endmodule
|
||||||
|
pair. Despite the name of this macro, this also works in pure C++ code.
|
||||||
|
|
||||||
|
If you will be reading or writing any Verilog variables in the C++
|
||||||
|
functions, the Verilog signals must be declared with a
|
||||||
|
:option:`/*verilator&32;public*/` metacomment. See also the public task
|
||||||
|
feature; writing an accessor may result in cleaner code.
|
||||||
|
|
||||||
|
.. option:: `SYSTEMVERILOG
|
||||||
|
|
||||||
|
The SYSTEMVERILOG, SV_COV_START and related standard defines are set by
|
||||||
|
default when :vlopt:`--language <--language>` is "1800-\*".
|
||||||
|
|
||||||
|
.. option:: `VERILATOR
|
||||||
|
|
||||||
|
.. option:: `verilator
|
||||||
|
|
||||||
|
.. option:: `verilator3
|
||||||
|
|
||||||
|
The VERILATOR, verilator and verilator3 defines are set by default so
|
||||||
|
you may "\`ifdef" around tool specific constructs.
|
||||||
|
|
||||||
|
.. option:: `verilator_config
|
||||||
|
|
||||||
|
Take remaining text up to the next :option:`\`verilog` mode switch and
|
||||||
|
treat it as Verilator configuration commands. See :ref:`Configuration Files`.
|
||||||
|
|
||||||
|
.. option:: `verilog
|
||||||
|
|
||||||
|
Switch back to processing Verilog code after a
|
||||||
|
:option:`\`systemc_... <\`systemc_header>` mode switch. The Verilog
|
||||||
|
code returns to the last language mode specified with
|
||||||
|
"\`begin_keywords", or SystemVerilog if none was specified.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;clock_enable*/
|
||||||
|
|
||||||
|
Used after a signal declaration to indicate the signal is used to gate a
|
||||||
|
clock, and the user takes responsibility for insuring there are no races
|
||||||
|
related to it. (Typically by adding a latch, and running static timing
|
||||||
|
analysis.) For example:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
reg enable_r /*verilator clock_enable*/;
|
||||||
|
wire gated_clk = clk & enable_r;
|
||||||
|
always_ff @(posedge clk)
|
||||||
|
enable_r <= enable_early;
|
||||||
|
|
||||||
|
The clock_enable attribute will cause the clock gate to be ignored in
|
||||||
|
the scheduling algorithm, sometimes required for correct clock behavior,
|
||||||
|
and always improving performance. It's also a good idea to enable the
|
||||||
|
:option:`IMPERFECTSCH` warning, to ensure all clock enables are properly
|
||||||
|
recognized.
|
||||||
|
|
||||||
|
Same as :option:`clock_enable` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;clocker*/
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;no_clocker*/
|
||||||
|
|
||||||
|
Used after a signal declaration to indicate the signal is used as clock
|
||||||
|
or not. This information is used by Verilator to mark the signal as
|
||||||
|
clocker and propagate the clocker attribute automatically to derived
|
||||||
|
signals. See :vlopt:`--clk`.
|
||||||
|
|
||||||
|
Same as :option:`clocker` and :option:`no_clocker` in configuration
|
||||||
|
files.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;coverage_block_off*/
|
||||||
|
|
||||||
|
Specifies the entire begin/end block should be ignored for coverage
|
||||||
|
analysis purposes.
|
||||||
|
|
||||||
|
Same as :option:`coverage_block_off` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;coverage_off*/
|
||||||
|
|
||||||
|
Specifies that following lines of code should have coverage disabled.
|
||||||
|
Often used to ignore an entire module for coverage analysis purposes.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;coverage_on*/
|
||||||
|
|
||||||
|
Specifies that following lines of code should have coverage re-enabled
|
||||||
|
(if appropriate :vlopt:`--coverage` flags are passed) after being
|
||||||
|
disabled earlier with :option:`/*verilator&32;coverage_off*/`.
|
||||||
|
|
||||||
|
|
||||||
|
.. _verilator_hier_block:
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;hier_block*/
|
||||||
|
|
||||||
|
Specifies that the module is a unit of hierarchical Verilation. This
|
||||||
|
metacomment must be between :code:`module module_name(...);` and
|
||||||
|
:code:`endmodule`. The module will not be inlined nor uniquified for
|
||||||
|
each instance in hierarchical Verilation. Note that the metacomment is
|
||||||
|
ignored unless the :vlopt:`--hierarchical` option is specified.
|
||||||
|
|
||||||
|
See :ref:`Hierarchical Verilation`.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;inline_module*/
|
||||||
|
|
||||||
|
Specifies the module the comment appears in may be inlined into any
|
||||||
|
modules that use this module. This is useful to speed up simulation
|
||||||
|
runtime. Note if using :vlopt:`--public` that signals under inlined
|
||||||
|
submodules will be named :code:`{submodule}__DOT__{subsignal}` as C++
|
||||||
|
does not allow "." in signal names.
|
||||||
|
|
||||||
|
Same as :option:`inline` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;isolate_assignments*/
|
||||||
|
|
||||||
|
Used after a signal declaration to indicate the assignments to this
|
||||||
|
signal in any blocks should be isolated into new blocks. When there is
|
||||||
|
a large combinatorial block that is resulting in an ``UNOPTFLAT``
|
||||||
|
warning, attaching this to the signal causing a false loop may clear up
|
||||||
|
the problem.
|
||||||
|
|
||||||
|
IE, with the following:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
reg splitme /* verilator isolate_assignments*/;
|
||||||
|
// Note the placement of the semicolon above
|
||||||
|
always_comb begin
|
||||||
|
if (....) begin
|
||||||
|
splitme = ....;
|
||||||
|
other assignments
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Verilator will internally split the block that assigns to "splitme" into
|
||||||
|
two blocks:
|
||||||
|
|
||||||
|
It would then internally break it into (sort of):
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
// All assignments excluding those to splitme
|
||||||
|
always_comb begin
|
||||||
|
if (....) begin
|
||||||
|
other assignments
|
||||||
|
end
|
||||||
|
end
|
||||||
|
// All assignments to splitme
|
||||||
|
always_comb begin
|
||||||
|
if (....) begin
|
||||||
|
splitme = ....;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Same as :option:`isolate_assignments` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;lint_off <msg>*/
|
||||||
|
|
||||||
|
Disable the specified warning message for any warnings following the
|
||||||
|
comment.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;lint_on <msg>*/
|
||||||
|
|
||||||
|
Re-enable the specified warning message for any warnings following the
|
||||||
|
comment.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;lint_restore*/
|
||||||
|
|
||||||
|
After a :code:`/*verilator&32;lint_save*/`, pop the stack containing lint
|
||||||
|
message state. Often this is useful at the bottom of include files.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;lint_save*/
|
||||||
|
|
||||||
|
Push the current state of what lint messages are turned on or turned off
|
||||||
|
to a stack. Later meta-comments may then lint_on or lint_off specific
|
||||||
|
messages, then return to the earlier message state by using
|
||||||
|
:code:`/*verilator&32;lint_restore*/`. For example:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
// verilator lint_save
|
||||||
|
// verilator lint_off WIDTH
|
||||||
|
... // code needing WIDTH turned off
|
||||||
|
// verilator lint_restore
|
||||||
|
|
||||||
|
If WIDTH was on before the lint_off, it will now be restored to on, and
|
||||||
|
if it was off before the lint_off it will remain off.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;no_inline_module*/
|
||||||
|
|
||||||
|
Specifies the module the comment appears in should not be inlined into
|
||||||
|
any modules that use this module.
|
||||||
|
|
||||||
|
Same as :option:`no_inline` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;no_inline_task*/
|
||||||
|
|
||||||
|
Used in a function or task variable definition section to specify the
|
||||||
|
function or task should not be inlined into where it is used. This may
|
||||||
|
reduce the size of the final executable when a task is used a very large
|
||||||
|
number of times. For this flag to work, the task and tasks below it
|
||||||
|
must be pure; they cannot reference any variables outside the task
|
||||||
|
itself.
|
||||||
|
|
||||||
|
Same as :option:`no_inline` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public*/ (on parameter)
|
||||||
|
|
||||||
|
Used after a parameter declaration to indicate the emitted C code should
|
||||||
|
have the parameter values visible. Due to C++ language restrictions,
|
||||||
|
this may only be used on 64-bit or narrower integral enumerations.
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
parameter [2:0] PARAM /*verilator public*/ = 2'b0;
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public*/ (on typedef enum)
|
||||||
|
|
||||||
|
Used after an enum typedef declaration to indicate the emitted C code
|
||||||
|
should have the enum values visible. Due to C++ language restrictions,
|
||||||
|
this may only be used on 64-bit or narrower integral enumerations.
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
typedef enum logic [2:0] { ZERO = 3'b0 } pub_t /*verilator public*/;
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public*/ (on variable)
|
||||||
|
|
||||||
|
Used after an input, output, register, or wire declaration to indicate
|
||||||
|
the signal should be declared so that C code may read or write the value
|
||||||
|
of the signal. This will also declare this module public, otherwise use
|
||||||
|
:code:`/*verilator&32;public_flat*/`.
|
||||||
|
|
||||||
|
Instead of using public variables, consider instead making a DPI or
|
||||||
|
public function that accesses the variable. This is nicer as it
|
||||||
|
provides an obvious entry point that is also compatible across
|
||||||
|
simulators.
|
||||||
|
|
||||||
|
Same as :option:`public` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public*/ (on task/function)
|
||||||
|
|
||||||
|
Used inside the declaration section of a function or task declaration to
|
||||||
|
indicate the function or task should be made into a C++ function, public
|
||||||
|
to outside callers. Public tasks will be declared as a void C++
|
||||||
|
function, public functions will get the appropriate non-void (bool,
|
||||||
|
uint32_t, etc) return type. Any input arguments will become C++
|
||||||
|
arguments to the function. Any output arguments will become C++
|
||||||
|
reference arguments. Any local registers/integers will become function
|
||||||
|
automatic variables on the stack.
|
||||||
|
|
||||||
|
Wide variables over 64 bits cannot be function returns, to avoid
|
||||||
|
exposing complexities. However, wide variables can be input/outputs;
|
||||||
|
they will be passed as references to an array of 32-bit numbers.
|
||||||
|
|
||||||
|
Generally, only the values of stored state (flops) should be written, as
|
||||||
|
the model will NOT notice changes made to variables in these functions.
|
||||||
|
(Same as when a signal is declared public.)
|
||||||
|
|
||||||
|
You may want to use DPI exports instead, as it's compatible with other
|
||||||
|
simulators.
|
||||||
|
|
||||||
|
Same as :option:`public` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public_flat*/ (on variable)
|
||||||
|
|
||||||
|
Used after an input, output, register, or wire declaration to indicate
|
||||||
|
the signal should be declared so that C code may read or write the value
|
||||||
|
of the signal. This will not declare this module public, which means
|
||||||
|
the name of the signal or path to it may change based upon the module
|
||||||
|
inlining which takes place.
|
||||||
|
|
||||||
|
Same as :option:`public_flat` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public_flat_rd*/ (on variable)
|
||||||
|
|
||||||
|
Used after an input, output, register, or wire declaration to indicate
|
||||||
|
the signal should be declared public_flat (see above), but read-only.
|
||||||
|
|
||||||
|
Same as :option:`public_flat_rd` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public_flat_rw @(<edge_list>)*/ (on variable)
|
||||||
|
|
||||||
|
Used after an input, output, register, or wire declaration to indicate
|
||||||
|
the signal should be declared public_flat_rd (see above), and also
|
||||||
|
writable, where writes should be considered to have the timing specified
|
||||||
|
by the given sensitivity edge list. Set for all variables, ports and
|
||||||
|
wires using the :vlopt:`--public-flat-rw` option.
|
||||||
|
|
||||||
|
Same as :option:`public_flat_rw` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;public_module*/
|
||||||
|
|
||||||
|
Used after a module statement to indicate the module should not be
|
||||||
|
inlined (unless specifically requested) so that C code may access the
|
||||||
|
module. Verilator automatically sets this attribute when the module
|
||||||
|
contains any public signals or \`systemc_ directives. Also set for all
|
||||||
|
modules when using the :vlopt:`--public` option.
|
||||||
|
|
||||||
|
Same as :option:`public` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;sc_clock*/
|
||||||
|
|
||||||
|
Deprecated and ignored. Previously used after an input declaration to
|
||||||
|
indicate the signal should be declared in SystemC as a sc_clock instead
|
||||||
|
of a bool. This was needed in SystemC 1.1 and 1.2 only; versions 2.0
|
||||||
|
and later do not require clock pins to be sc_clocks and this is no
|
||||||
|
longer needed and is ignored.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;sc_bv*/
|
||||||
|
|
||||||
|
Used after a port declaration. It sets the port to be of
|
||||||
|
:code:`sc_bv<{width}>` type, instead of bool, vluint32_t or vluint64_t.
|
||||||
|
This may be useful if the port width is parameterized and the
|
||||||
|
instantiating C++ code wants to always have a sc_bv so it can accept any
|
||||||
|
width. In general you should avoid using this attribute when not
|
||||||
|
necessary as with increasing usage of sc_bv the performance decreases
|
||||||
|
significantly.
|
||||||
|
|
||||||
|
Same as :option:`sc_bv` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;sformat*/
|
||||||
|
|
||||||
|
Attached to the final argument of type "input string" of a function or
|
||||||
|
task to indicate the function or task should pass all remaining
|
||||||
|
arguments through $sformatf. This allows creation of DPI functions with
|
||||||
|
$display like behavior. See the :file:`test_regress/t/t_dpi_display.v`
|
||||||
|
file for an example.
|
||||||
|
|
||||||
|
Same as :option:`sformat` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;split_var*/
|
||||||
|
|
||||||
|
Attached to a variable or a net declaration to break the variable into
|
||||||
|
multiple pieces typically to resolve ``UNOPTFLAT`` performance issues.
|
||||||
|
Typically the variables to attach this to are recommended by Verilator
|
||||||
|
itself, see :option:`UNOPTFLAT`.
|
||||||
|
|
||||||
|
For example, Verilator will internally convert a variable with the
|
||||||
|
metacomment such as:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
logic [7:0] x [0:1] /*verilator split_var*/;
|
||||||
|
|
||||||
|
To:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
logic [7:0] x__BRA__0__KET__ /*verilator split_var*/;
|
||||||
|
logic [7:0] x__BRA__1__KET__ /*verilator split_var*/;
|
||||||
|
|
||||||
|
Note that the generated packed variables retain the split_var
|
||||||
|
metacomment because they may be split into further smaller pieces
|
||||||
|
according to the access patterns.
|
||||||
|
|
||||||
|
This only supports unpacked arrays, packed arrays, and packed structs of
|
||||||
|
integer types (reg, logic, bit, byte, int...); otherwise if a split was
|
||||||
|
requested but cannot occur a SPLITVAR warning is issued. Splitting
|
||||||
|
large arrays may slow down the Verilation speed, so use this only on
|
||||||
|
variables that require it.
|
||||||
|
|
||||||
|
Same as :option:`split_var` configuration file option.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;tag <text...>*/
|
||||||
|
|
||||||
|
Attached after a variable or structure member to indicate opaque (to
|
||||||
|
Verilator) text that should be passed through to the XML output as a tag,
|
||||||
|
for use by downstream applications.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;tracing_off*/
|
||||||
|
|
||||||
|
Disable waveform tracing for all future signals that are declared in
|
||||||
|
this module, or instances below this module. Often this is placed just
|
||||||
|
after a primitive's module statement, so that the entire module and
|
||||||
|
instances below it are not traced.
|
||||||
|
|
||||||
|
.. option:: /*verilator&32;tracing_on*/
|
||||||
|
|
||||||
|
Re-enable waveform tracing for all future signals or instances that are
|
||||||
|
declared.
|
||||||
@@ -0,0 +1,497 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
******************************
|
||||||
|
FAQ/Frequently Asked Questions
|
||||||
|
******************************
|
||||||
|
|
||||||
|
.. Extra heading level here so sidebar index looks nice
|
||||||
|
|
||||||
|
Questions
|
||||||
|
=========
|
||||||
|
|
||||||
|
Can I contribute?
|
||||||
|
"""""""""""""""""
|
||||||
|
|
||||||
|
Please contribute! Just submit a pull request, or raise an issue to
|
||||||
|
discuss if looking for something to help on. For more information see our
|
||||||
|
contributor agreement.
|
||||||
|
|
||||||
|
|
||||||
|
How widely is Verilator used?
|
||||||
|
"""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Verilator is used by many of the largest silicon design companies, large
|
||||||
|
organizations such as CERN, and even by college student projects.
|
||||||
|
|
||||||
|
Verilator is one of the "big 4" simulators, meaning one of the 4 main
|
||||||
|
SystemVerilog simulators available, namely the closed-source products Synopsys
|
||||||
|
VCS (tm), Mentor Questa/ModelSim (tm), Cadence
|
||||||
|
Xcelium/Incisive/NC-Verilog/NC-Sim (tm), and the open-source Verilator.
|
||||||
|
The three closed-source offerings are often collectively called the "big 3"
|
||||||
|
simulators.
|
||||||
|
|
||||||
|
|
||||||
|
Does Verilator run under Windows?
|
||||||
|
"""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Yes, using Cygwin. Verilated output also compiles under Microsoft Visual
|
||||||
|
C++, but this is not tested every release.
|
||||||
|
|
||||||
|
|
||||||
|
Can you provide binaries?
|
||||||
|
"""""""""""""""""""""""""
|
||||||
|
|
||||||
|
You can install Verilator via the system package manager (apt, yum, etc.)
|
||||||
|
on many Linux distributions, including Debian, Ubuntu, SuSE, RedHat, and
|
||||||
|
others. These packages are provided by the Linux distributions and
|
||||||
|
generally will lag the version of the mainline Verilator repository. If no
|
||||||
|
binary package is available for your distribution, how about you set one
|
||||||
|
up?
|
||||||
|
|
||||||
|
|
||||||
|
How can it be faster than (name-a-big-3-closed-source-simulator)?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Generally, the implied part of the question is "... with all of the
|
||||||
|
manpower they can put into developing it."
|
||||||
|
|
||||||
|
Most simulators have to be compliant with the complete IEEE 1364 (Verilog)
|
||||||
|
and IEEE 1800 (SystemVerilog) standards, meaning they have to be event
|
||||||
|
driven. This prevents them from being able to reorder blocks and make
|
||||||
|
netlist-style optimizations, which are where most of the gains come from.
|
||||||
|
|
||||||
|
You should not be scared by non-compliance. Your synthesis tool isn't
|
||||||
|
compliant with the whole standard to start with, so your simulator need not
|
||||||
|
be either. Verilator is closer to the synthesis interpretation, so this is
|
||||||
|
a good thing for getting working silicon.
|
||||||
|
|
||||||
|
|
||||||
|
Will Verilator output remain under my own license/copyright?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Yes, it's just like using GCC on your programs; this is why Verilator uses
|
||||||
|
the "GNU **Lesser** Public License Version 3" instead of the more typical
|
||||||
|
"GNU Public License". See the licenses for details, but in brief, if you
|
||||||
|
change Verilator itself or the header files Verilator includes, you must
|
||||||
|
make the source code available under the GNU Lesser Public License.
|
||||||
|
However, Verilator output (the Verilated code) only "include"s the licensed
|
||||||
|
files, and so you are **not** required to open-source release any output
|
||||||
|
from Verilator.
|
||||||
|
|
||||||
|
You also have the option of using the Perl Artistic License, which again
|
||||||
|
does not require you to release your Verilog or generated code, and also
|
||||||
|
allows you to modify Verilator for internal use without distributing the
|
||||||
|
modified version. But please contribute back to the community!
|
||||||
|
|
||||||
|
One limit is that you cannot under either license release a closed-source
|
||||||
|
Verilog simulation product incorporating Verilator. That is you can have a
|
||||||
|
commercial product, but must make the source code available.
|
||||||
|
|
||||||
|
As is standard with Open Source, contributions back to Verilator will be
|
||||||
|
placed under the Verilator copyright and LGPL/Artistic license. Small test
|
||||||
|
cases will be released into the public domain so they can be used anywhere,
|
||||||
|
and large tests under the LGPL/Artistic, unless requested otherwise.
|
||||||
|
|
||||||
|
|
||||||
|
Why is running Verilator (to create a model) so slow?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Verilator may require more memory than the resulting simulator will
|
||||||
|
require, as Verilator internally creates all of the state of the resulting
|
||||||
|
generated simulator in order to optimize it. If it takes more than a few
|
||||||
|
minutes or so (and you're not using :vlopt:`--debug` since debug mode is
|
||||||
|
disk bound), see if your machine is paging; most likely you need to run it
|
||||||
|
on a machine with more memory. Very large designs are known to have topped
|
||||||
|
64 GB resident set size. Alternatively, see :ref:`Hierarchical Verilation`.
|
||||||
|
|
||||||
|
|
||||||
|
How do I generate waveforms (traces) in C++?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
See also the next question for tracing in SystemC mode.
|
||||||
|
|
||||||
|
A. Pass the :vlopt:`--trace` option to Verilator, and in your top level C
|
||||||
|
code, call ``Verilated::traceEverOn(true)``. Then you may use
|
||||||
|
``$dumpfile`` and ``$dumpvars`` to enable traces, same as with any
|
||||||
|
Verilog simulator. See ``examples/make_tracing_c`` in the distribution.
|
||||||
|
|
||||||
|
B. Or, for finer-grained control, or C++ files with multiple Verilated
|
||||||
|
modules you may also create the trace purely from C++. Create a
|
||||||
|
VerilatedVcdC object, and in your main loop right after ``eval()`` call
|
||||||
|
``trace_object->dump(contextp->time())`` every time step, and finally
|
||||||
|
call ``trace_object->close()``.
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
:emphasize-lines: 1,5-8,12
|
||||||
|
|
||||||
|
#include "verilated_vcd_c.h"
|
||||||
|
...
|
||||||
|
int main(int argc, char** argv, char** env) {
|
||||||
|
const std::unique_ptr<VerilatedContext> contextp{new VerilatedContext};
|
||||||
|
...
|
||||||
|
Verilated::traceEverOn(true);
|
||||||
|
VerilatedVcdC* tfp = new VerilatedVcdC;
|
||||||
|
topp->trace(tfp, 99); // Trace 99 levels of hierarchy
|
||||||
|
tfp->open("obj_dir/t_trace_ena_cc/simx.vcd");
|
||||||
|
...
|
||||||
|
while (contextp->time() < sim_time && !contextp->gotFinish()) {
|
||||||
|
contextp->timeInc(1);
|
||||||
|
topp->eval();
|
||||||
|
tfp->dump(contextp->time());
|
||||||
|
}
|
||||||
|
tfp->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
You also need to compile :file:`verilated_vcd_c.cpp` and add it to your
|
||||||
|
link, preferably by adding the dependencies in your Makefile's
|
||||||
|
:code:`$(VK_GLOBAL_OBJS)` link rule. This is done for you if using the
|
||||||
|
Verilator :vlopt:`--exe` option.
|
||||||
|
|
||||||
|
you can call :code:`trace_object->trace()` on multiple Verilated objects
|
||||||
|
with the same trace file if you want all data to land in the same output
|
||||||
|
file.
|
||||||
|
|
||||||
|
|
||||||
|
How do I generate waveforms (traces) in SystemC?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
A. Pass the :vlopt:`--trace` option to Verilator, and in your top level
|
||||||
|
:code:`sc_main()`, call :code:`Verilated::traceEverOn(true)`. Then you
|
||||||
|
may use :code:`$dumpfile` and code:`$dumpvars` to enable traces, same as
|
||||||
|
with any Verilog simulator, see the non-SystemC example in
|
||||||
|
:file:`examples/make_tracing_c`. This will trace only the module
|
||||||
|
containing the :code:`$dumpvar`.
|
||||||
|
|
||||||
|
B. Or, you may create a trace purely from SystemC, which may trace all
|
||||||
|
Verilated designs in the SystemC model. Create a VerilatedVcdSc object
|
||||||
|
as you would create a normal SystemC trace file. For an example, see
|
||||||
|
the call to ``VerilatedVcdSc`` in the
|
||||||
|
:file:`examples/make_tracing_sc/sc_main.cpp` file of the distribution,
|
||||||
|
and below.
|
||||||
|
|
||||||
|
C. Alternatively you may use the C++ trace mechanism described in the
|
||||||
|
previous question, note the timescale and timeprecision will be
|
||||||
|
inherited from your SystemC settings.
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
:emphasize-lines: 1,5-8
|
||||||
|
|
||||||
|
#include "verilated_vcd_sc.h"
|
||||||
|
...
|
||||||
|
int main(int argc, char** argv, char** env) {
|
||||||
|
...
|
||||||
|
Verilated::traceEverOn(true);
|
||||||
|
VerilatedVcdSc* tfp = new VerilatedVcdSc;
|
||||||
|
topp->trace(tfp, 99); // Trace 99 levels of hierarchy
|
||||||
|
tfp->open("obj_dir/t_trace_ena_cc/simx.vcd");
|
||||||
|
...
|
||||||
|
sc_start(1);
|
||||||
|
...
|
||||||
|
tfp->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
You also need to compile :file:`verilated_vcd_sc.cpp` and
|
||||||
|
:file:`verilated_vcd_c.cpp` and add them to your link, preferably by adding
|
||||||
|
the dependencies in your Makefile's :code:`$(VK_GLOBAL_OBJS)` link rule.
|
||||||
|
This is done for you if using the Verilator :vlopt:`--exe` option.
|
||||||
|
|
||||||
|
You can call :code:`->trace()` on multiple Verilated objects with the same
|
||||||
|
trace file if you want all data to land in the same output file.
|
||||||
|
|
||||||
|
When using SystemC 2.3, the SystemC library must have been built with the
|
||||||
|
experimental simulation phase callback based tracing disabled. This is
|
||||||
|
disabled by default when building SystemC with its configure based build
|
||||||
|
system, but when building SystemC with CMake, you must pass
|
||||||
|
``-DENABLE_PHASE_CALLBACKS_TRACING=OFF`` to disable this feature.
|
||||||
|
|
||||||
|
|
||||||
|
How do I generate FST waveforms (traces) in C++ or SystemC?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
FST is a trace file format developed by GTKWave. Verilator provides basic
|
||||||
|
FST support. To dump traces in FST format, add the :vlopt:`--trace-fst`
|
||||||
|
option to Verilator and either A. use :code:`$dumpfile & $dumpvars` in
|
||||||
|
Verilog as described in the VCD example above,
|
||||||
|
|
||||||
|
Or, in C++ change the include described in the VCD example above:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "verilated_fst_c.h"
|
||||||
|
VerilatedFstC* tfp = new VerilatedFstC;
|
||||||
|
|
||||||
|
|
||||||
|
Or, in SystemC change the include described in the VCD example above:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "verilated_fst_sc.h"
|
||||||
|
VerilatedFstC* tfp = new VerilatedFstSc;
|
||||||
|
|
||||||
|
|
||||||
|
Note that currently supporting both FST and VCD in a single simulation is
|
||||||
|
impossible, but such requirement should be rare. You can however ifdef
|
||||||
|
around the trace format in your C++ main loop, and select VCD or FST at
|
||||||
|
build time, should you require.
|
||||||
|
|
||||||
|
|
||||||
|
How do I view waveforms (aka dumps or traces)?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Verilator creates standard VCD (Value Change Dump) and FST files. VCD
|
||||||
|
files are viewable with the open source GTKWave (recommended) or Dinotrace
|
||||||
|
(legacy) programs, or any of the many closed-source offerings; FST is
|
||||||
|
supported only by GTKWave.
|
||||||
|
|
||||||
|
|
||||||
|
How do I speed up writing large waveform (trace) files?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
A. Instead of calling ``VerilatedVcdC->open`` or ``$dumpvars`` at the
|
||||||
|
beginning of time, delay calling it until the time stamp where you want
|
||||||
|
tracing to begin.
|
||||||
|
|
||||||
|
B. Add the :option:`/*verilator&32;tracing_off*/` metacomment to any very
|
||||||
|
low level modules you never want to trace (such as perhaps library
|
||||||
|
cells).
|
||||||
|
|
||||||
|
C. Use the :vlopt:`--trace-depth` option to limit the depth of tracing, for
|
||||||
|
example :vlopt:`--trace-depth 1 <--trace-depth>` to see only the top
|
||||||
|
level signals.
|
||||||
|
|
||||||
|
D. You can also consider using FST tracing instead of VCD. FST dumps are a
|
||||||
|
fraction of the size of the equivalent VCD. FST tracing can be slower
|
||||||
|
than VCD tracing, but it might be the only option if the VCD file size
|
||||||
|
is prohibitively large.
|
||||||
|
|
||||||
|
E. Be sure you write your trace files to a local solid-state drive, instead
|
||||||
|
of to a network drive. Network drives are generally far slower.
|
||||||
|
|
||||||
|
|
||||||
|
Where is the translate_off command? (How do I ignore a construct?)
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Translate on/off pragmas are generally a bad idea, as it's easy to have
|
||||||
|
mismatched pairs, and you can't see what another tool sees by just
|
||||||
|
preprocessing the code. Instead, use the preprocessor; Verilator defines
|
||||||
|
the ``\`VERILATOR`` define for you, so just wrap the code in an ifndef
|
||||||
|
region:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
:emphasize-lines: 1
|
||||||
|
|
||||||
|
`ifndef VERILATOR
|
||||||
|
Something_Verilator_Dislikes;
|
||||||
|
`endif
|
||||||
|
|
||||||
|
Most synthesis tools similarly define SYNTHESIS for you.
|
||||||
|
|
||||||
|
|
||||||
|
Why do I get "unexpected 'do'" or "unexpected 'bit'" errors?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
The words \ ``do``\ , \ ``bit``\ , \ ``ref``\ , \ ``return``\ , and others
|
||||||
|
are reserved keywords in SystemVerilog. Older Verilog code might use these
|
||||||
|
as identifiers. You should change your code to not use them to ensure it
|
||||||
|
works with newer tools. Alternatively, surround them by the Verilog
|
||||||
|
2005/SystemVerilog begin_keywords pragma to indicate Verilog 2001 code.
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
:emphasize-lines: 1
|
||||||
|
|
||||||
|
`begin_keywords "1364-2001"
|
||||||
|
integer bit; initial bit = 1;
|
||||||
|
`end_keywords
|
||||||
|
|
||||||
|
|
||||||
|
If you want the whole design to be parsed as Verilog 2001, see the
|
||||||
|
:vlopt:`--default-language` option.
|
||||||
|
|
||||||
|
|
||||||
|
How do I prevent my assertions from firing during reset?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Call :code:`Verilated::assertOn(false)` before you first call the model,
|
||||||
|
then turn it back on after reset. It defaults to true. When false, all
|
||||||
|
assertions controlled by :vlopt:`--assert` are disabled.
|
||||||
|
|
||||||
|
|
||||||
|
Why do I get "undefined reference to sc_time_stamp()?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
In Verilator 4.200 and later, using the timeInc function is recommended
|
||||||
|
instead. See the :ref:`Connecting to C++` examples. Some linkers (MSVC++)
|
||||||
|
still require :code:`sc_time_stamp()` to be defined, either define this
|
||||||
|
with :code:`double sc_time_stamp() { return 0; }` or compile the Verilated
|
||||||
|
code with :code:`-CFLAGS -DVL_TIME_CONTEXT`.
|
||||||
|
|
||||||
|
Prior to Verilator 4.200, the :code:`sc_time_stamp()` function needs to be
|
||||||
|
defined in C++ (non SystemC) to return the current simulation time.
|
||||||
|
|
||||||
|
|
||||||
|
Why do I get "undefined reference to \`VL_RAND_RESET_I' or \`Verilated::...'"?
|
||||||
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
You need to link your compiled Verilated code against the
|
||||||
|
:code:`verilated.cpp` file found in the include directory of the Verilator
|
||||||
|
kit. This is one target in the ``$(VK_GLOBAL_OBJS)`` make variable, which
|
||||||
|
should be part of your Makefile's link rule. If you use :vlopt:`--exe`,
|
||||||
|
this is done for you.
|
||||||
|
|
||||||
|
|
||||||
|
Is the PLI supported?
|
||||||
|
"""""""""""""""""""""
|
||||||
|
|
||||||
|
Only somewhat. More specifically, the common PLI-ish calls $display,
|
||||||
|
$finish, $stop, $time, $write are converted to C++ equivalents. You can
|
||||||
|
also use the "import DPI" SystemVerilog feature to call C code (see the
|
||||||
|
chapter above). There is also limited VPI access to public signals.
|
||||||
|
|
||||||
|
If you want something more complex, since Verilator emits standard C++
|
||||||
|
code, you can simply write your own C++ routines that can access and modify
|
||||||
|
signal values without needing any PLI interface code, and call it with
|
||||||
|
$c("{any_c++_statement}").
|
||||||
|
|
||||||
|
See the :ref:`Connecting` section.
|
||||||
|
|
||||||
|
|
||||||
|
How do I make a Verilog module that contain a C++ object?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
You need to add the object to the structure that Verilator creates, then
|
||||||
|
use $c to call a method inside your object. The
|
||||||
|
:file:`test_regress/t/t_extend_class` files in the distribution show an
|
||||||
|
example of how to do this.
|
||||||
|
|
||||||
|
|
||||||
|
How do I get faster build times?
|
||||||
|
""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
* When running make, pass the make variable VM_PARALLEL_BUILDS=1 so that
|
||||||
|
builds occur in parallel. Note this is now set by default if an output
|
||||||
|
file was large enough to be split due to the :vlopt:`--output-split`
|
||||||
|
option.
|
||||||
|
|
||||||
|
* Verilator emits any infrequently executed "cold" routines into separate
|
||||||
|
__Slow.cpp files. This can accelerate compilation as optimization can be
|
||||||
|
disabled on these routines. See the OPT_FAST and OPT_SLOW make variables
|
||||||
|
and :ref:`Benchmarking & Optimization`.
|
||||||
|
|
||||||
|
* Use a recent compiler. Newer compilers tend to be faster.
|
||||||
|
|
||||||
|
* Compile in parallel on many machines and use caching; see the web for the
|
||||||
|
ccache, distcc and icecream packages. ccache will skip GCC runs between
|
||||||
|
identical source builds, even across different users. If ccache was
|
||||||
|
installed when Verilator was built it is used, or see OBJCACHE
|
||||||
|
environment variable to override this. Also see the
|
||||||
|
:vlopt:`--output-split` option and :ref: `Profiling ccache efficiency`
|
||||||
|
|
||||||
|
* To reduce the compile time of classes that use a Verilated module (e.g. a
|
||||||
|
top CPP file) you may wish to add a
|
||||||
|
:option:`/*verilator&32;no_inline_module*/` metacomment to your top level
|
||||||
|
module. This will decrease the amount of code in the model's Verilated
|
||||||
|
class, improving compile times of any instantiating top level C++ code,
|
||||||
|
at a relatively small cost of execution performance.
|
||||||
|
|
||||||
|
* Use :ref:`hierarchical verilation`.
|
||||||
|
|
||||||
|
|
||||||
|
Why do so many files need to recompile when I add a signal?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Adding a new signal requires the symbol table to be recompiled. Verilator
|
||||||
|
uses one large symbol table, as that results in 2-3 less assembly
|
||||||
|
instructions for each signal access. This makes the execution time 10-15%
|
||||||
|
faster, but can result in more compilations when something changes.
|
||||||
|
|
||||||
|
|
||||||
|
How do I access Verilog functions/tasks in C?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Use the SystemVerilog Direct Programming Interface. You write a Verilog
|
||||||
|
function or task with input/outputs that match what you want to call in
|
||||||
|
with C. Then mark that function as a DPI export function. See the DPI
|
||||||
|
chapter in the IEEE Standard.
|
||||||
|
|
||||||
|
|
||||||
|
How do I access C++ functions/tasks in Verilog?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Use the SystemVerilog Direct Programming Interface. You write a Verilog
|
||||||
|
function or task with input/outputs that match what you want to call in
|
||||||
|
with C. Then mark that function as a DPI import function. See the DPI
|
||||||
|
chapter in the IEEE Standard.
|
||||||
|
|
||||||
|
|
||||||
|
How do I access signals in C?
|
||||||
|
"""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
The best thing to do is to make a SystemVerilog "export DPI" task or
|
||||||
|
function that accesses that signal, as described in the DPI chapter in the
|
||||||
|
manual and DPI tutorials on the web. This will allow Verilator to better
|
||||||
|
optimize the model and should be portable across simulators.
|
||||||
|
|
||||||
|
If you really want raw access to the signals, declare the signals you will
|
||||||
|
be accessing with a :option:`/*verilator&32;public*/` metacomment before
|
||||||
|
the closing semicolon. Then scope into the C++ class to read the value of
|
||||||
|
the signal, as you would any other member variable.
|
||||||
|
|
||||||
|
Signals are the smallest of 8-bit unsigned chars (equivalent to uint8_t),
|
||||||
|
16-bit unsigned shorts (uint16_t), 32-bit unsigned longs (uint32_t), or
|
||||||
|
64-bit unsigned long longs (uint64_t) that fits the width of the signal.
|
||||||
|
Generally, you can use just uint32_t's for 1 to 32 bits, or vluint64_t for
|
||||||
|
1 to 64 bits, and the compiler will properly up-convert smaller entities.
|
||||||
|
Note even signed ports are declared as unsigned; you must sign extend
|
||||||
|
yourself to the appropriate signal width.
|
||||||
|
|
||||||
|
Signals wider than 64 bits are stored as an array of 32-bit uint32_t's.
|
||||||
|
Thus to read bits 31:0, access signal[0], and for bits 63:32, access
|
||||||
|
signal[1]. Unused bits (for example bit numbers 65-96 of a 65-bit vector)
|
||||||
|
will always be zero. If you change the value you must make sure to pack
|
||||||
|
zeros in the unused bits or core-dumps may result, because Verilator strips
|
||||||
|
array bound checks where it believes them to be unnecessary to improve
|
||||||
|
performance.
|
||||||
|
|
||||||
|
In the SYSTEMC example above, if you had in our.v:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
input clk /*verilator public*/;
|
||||||
|
// Note the placement of the semicolon above
|
||||||
|
|
||||||
|
From the sc_main.cpp file, you'd then:
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
#include "Vour.h"
|
||||||
|
#include "Vour_our.h"
|
||||||
|
cout << "clock is " << top->our->clk << endl;
|
||||||
|
|
||||||
|
|
||||||
|
In this example, clk is a bool you can read or set as any other variable.
|
||||||
|
The value of normal signals may be set, though clocks shouldn't be changed
|
||||||
|
by your code or you'll get strange results.
|
||||||
|
|
||||||
|
|
||||||
|
Should a module be in Verilog or SystemC?
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
Sometimes there is a block that just interconnects instances, and have a
|
||||||
|
choice as to if you write it in Verilog or SystemC. Everything else being
|
||||||
|
equal, best performance is when Verilator sees all of the design. So, look
|
||||||
|
at the hierarchy of your design, labeling instances as to if they are
|
||||||
|
SystemC or Verilog. Then:
|
||||||
|
|
||||||
|
* A module with only SystemC instances below must be SystemC.
|
||||||
|
|
||||||
|
* A module with a mix of Verilog and SystemC instances below must be
|
||||||
|
SystemC. (As Verilator cannot connect to lower-level SystemC instances.)
|
||||||
|
|
||||||
|
* A module with only Verilog instances below can be either, but for best
|
||||||
|
performance should be Verilog. (The exception is if you have a design
|
||||||
|
that is instantiated many times; in this case Verilating one of the lower
|
||||||
|
modules and instantiating that Verilated instances multiple times into a
|
||||||
|
SystemC module *may* be faster.)
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
@@ -0,0 +1,147 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
*****
|
||||||
|
Files
|
||||||
|
*****
|
||||||
|
|
||||||
|
.. _Files in the Distribution:
|
||||||
|
|
||||||
|
Files in the Git Tree
|
||||||
|
=====================
|
||||||
|
|
||||||
|
The following is a summary of the files in the Git Tree (distribution) of
|
||||||
|
Verilator:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
Changes => Version history
|
||||||
|
README.rst => This document
|
||||||
|
bin/verilator => Compiler wrapper invoked to Verilate code
|
||||||
|
docs/ => Additional documentation
|
||||||
|
examples/ => Examples (see manual for descriptions)
|
||||||
|
include/ => Files that should be in your -I compiler path
|
||||||
|
include/verilated*.cpp => Global routines to link into your simulator
|
||||||
|
include/verilated*.h => Global headers
|
||||||
|
include/verilated.mk => Common Makefile
|
||||||
|
src/ => Translator source code
|
||||||
|
test_regress => Internal tests
|
||||||
|
|
||||||
|
|
||||||
|
.. _Files Read/Written:
|
||||||
|
|
||||||
|
Files Read/Written
|
||||||
|
==================
|
||||||
|
|
||||||
|
All output files are placed in the output directory specified with the
|
||||||
|
:vlopt:`--Mdir` option, or "obj_dir" if not specified.
|
||||||
|
|
||||||
|
Verilator creates the following files in the output directory:
|
||||||
|
|
||||||
|
For --cc/--sc, it creates:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - *{prefix}*\ .cmake
|
||||||
|
- CMake include script for compiling (from --make cmake)
|
||||||
|
* - *{prefix}*\ .mk
|
||||||
|
- Make include file for compiling (from --make gmake)
|
||||||
|
* - *{prefix}*\ _classes.mk
|
||||||
|
- Make include file with class names (from --make gmake)
|
||||||
|
* - *{prefix}*\ _hier.mk
|
||||||
|
- Make file for hierarchy blocks (from --make gmake)
|
||||||
|
* - *{prefix|*\ _hierMkArgs.f
|
||||||
|
- Arguments for hierarchical Verilation (from --make gmake)
|
||||||
|
* - *{prefix}*\ _hierCMakeArgs.f
|
||||||
|
- Arguments for hierarchical Verilation (from --make cmake)
|
||||||
|
* - *{prefix}*\ .h
|
||||||
|
- Model header
|
||||||
|
* - *{prefix}*\ .cpp
|
||||||
|
- Model C++ file
|
||||||
|
* - *{prefix}*\ ___024root.h
|
||||||
|
- Top level (SystemVerilog $root) internal header file
|
||||||
|
* - *{prefix}*\ ___024root.cpp
|
||||||
|
- Top level (SystemVerilog $root) internal C++ file
|
||||||
|
* - *{prefix}*___024root*{__n}*\ .cpp
|
||||||
|
- Additional top level internal C++ files (from --output-split)
|
||||||
|
* - *{prefix}*\ ___024root__Slow\ *{__n}*\ .cpp
|
||||||
|
- Infrequent cold routines
|
||||||
|
* - *{prefix}*\ ___024root__Trace{__n}*\ .cpp
|
||||||
|
- Wave file generation code (from --trace)
|
||||||
|
* - *{prefix}*\ ___024root__Trace__Slow{__n}*\ .cpp
|
||||||
|
- Wave file generation code (from --trace)
|
||||||
|
* - *{prefix}*\ __Dpi.h
|
||||||
|
- DPI import and export declarations (from --dpi)
|
||||||
|
* - *{prefix}*\ __Dpi.cpp
|
||||||
|
- Global DPI export wrappers (from --dpi)
|
||||||
|
* - *{prefix}*\ __Dpi_Export\ *{__n}\ .cpp
|
||||||
|
- DPI export wrappers scoped to this particular model (from --dpi)
|
||||||
|
* - *{prefix}*\ __Inlines.h
|
||||||
|
- Inline support functions
|
||||||
|
* - *{prefix}*\ __Syms.h
|
||||||
|
- Global symbol table header
|
||||||
|
* - *{prefix}*\ __Syms.cpp
|
||||||
|
- Global symbol table C++
|
||||||
|
* - *{prefix}{each_verilog_module}*\ .h
|
||||||
|
- Lower level internal header files
|
||||||
|
* - *{prefix}{each_verilog_module}*\ .cpp
|
||||||
|
- Lower level internal C++ files
|
||||||
|
* - *{prefix}{each_verilog_module}{__n}*\ .cpp
|
||||||
|
- Additional lower C++ files (from --output-split)
|
||||||
|
|
||||||
|
For --hierarchy mode, it creates:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - V\ *{hier_block}*\ /
|
||||||
|
- Directory to Verilate each hierarchy block (from --hierarchy)
|
||||||
|
* - *{prefix}*\ __hierVer.d
|
||||||
|
- Make dependencies of the top module (from --hierarchy)
|
||||||
|
* - *{prefix}*\ __hier.dir
|
||||||
|
- Directory to store .dot, .vpp, .tree of top module (from --hierarchy)
|
||||||
|
|
||||||
|
In certain debug and other modes, it also creates:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - *{prefix}*\ .xml
|
||||||
|
- XML tree information (from --xml)
|
||||||
|
* - *{prefix}*\ __cdc.txt
|
||||||
|
- Clock Domain Crossing checks (from --cdc)
|
||||||
|
* - *{prefix}*\ __stats.txt
|
||||||
|
- Statistics (from --stats)
|
||||||
|
* - *{prefix}*\ __idmap.txt
|
||||||
|
- Symbol demangling (from --protect-ids)
|
||||||
|
* - *{prefix}*\ __ver.d
|
||||||
|
- Make dependencies (from -MMD)
|
||||||
|
* - *{prefix}*\ __verFiles.dat
|
||||||
|
- Timestamps (from --skip-identical)
|
||||||
|
* - *{prefix}{misc}*\ .dot
|
||||||
|
- Debugging graph files (from --debug)
|
||||||
|
* - *{prefix}{misc}*\ .tree
|
||||||
|
- Debugging files (from --debug)
|
||||||
|
* - {mod_prefix}_{each_verilog_module}*{__n}*\ .vpp
|
||||||
|
- Pre-processed verilog (from --debug)
|
||||||
|
|
||||||
|
After running Make, the C++ compiler may produce the following:
|
||||||
|
|
||||||
|
.. list-table::
|
||||||
|
|
||||||
|
* - verilated{misc}*\ .d
|
||||||
|
- Intermediate dependencies
|
||||||
|
* - verilated{misc}*\ .o
|
||||||
|
- Intermediate objects
|
||||||
|
* - {mod_prefix}{misc}*\ .d
|
||||||
|
- Intermediate dependencies
|
||||||
|
* - {mod_prefix}{misc}*\ .o
|
||||||
|
- Intermediate objects
|
||||||
|
* - *{prefix}*\
|
||||||
|
- Final executable (from --exe)
|
||||||
|
* - *{prefix}*\ __ALL.a
|
||||||
|
- Library of all Verilated objects
|
||||||
|
* - *{prefix}*\ __ALL.cpp
|
||||||
|
- Include of all code for single compile
|
||||||
|
* - *{prefix}{misc}*\ .d
|
||||||
|
- Intermediate dependencies
|
||||||
|
* - *{prefix}{misc}*\ .o
|
||||||
|
- Intermediate objects
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
######################
|
||||||
|
Verilator User's Guide
|
||||||
|
######################
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: Getting Started
|
||||||
|
|
||||||
|
overview.rst
|
||||||
|
examples.rst
|
||||||
|
install.rst
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
:caption: User's Guide
|
||||||
|
|
||||||
|
verilating.rst
|
||||||
|
connecting.rst
|
||||||
|
simulating.rst
|
||||||
|
contributing.rst
|
||||||
|
faq.rst
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 1
|
||||||
|
:caption: Reference Guide
|
||||||
|
|
||||||
|
languages.rst
|
||||||
|
extensions.rst
|
||||||
|
executables.rst
|
||||||
|
warnings.rst
|
||||||
|
files.rst
|
||||||
|
environment.rst
|
||||||
|
deprecations.rst
|
||||||
|
contributors.rst
|
||||||
|
changes.rst
|
||||||
|
copyright.rst
|
||||||
@@ -0,0 +1,321 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
.. _Installation:
|
||||||
|
|
||||||
|
************
|
||||||
|
Installation
|
||||||
|
************
|
||||||
|
|
||||||
|
This section discusses how to install Verilator.
|
||||||
|
|
||||||
|
.. _Package Manager Quick Install:
|
||||||
|
|
||||||
|
Package Manager Quick Install
|
||||||
|
=============================
|
||||||
|
|
||||||
|
Using a distribution's package manager is the easiest way to get
|
||||||
|
started. (Note packages are unlikely to have the most recent version, so
|
||||||
|
:ref:`Git Install`, might be a better alternative.) To install as a
|
||||||
|
package:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
apt-get install verilator # On Ubuntu
|
||||||
|
|
||||||
|
|
||||||
|
.. _Git Install:
|
||||||
|
|
||||||
|
Git Quick Install
|
||||||
|
=================
|
||||||
|
|
||||||
|
Installing Verilator from Git provides the most flexibility. For additional
|
||||||
|
options and details see :ref:`Detailed Build Instructions` below.
|
||||||
|
|
||||||
|
In brief, to install from git:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
# Prerequisites:
|
||||||
|
#sudo apt-get install git perl python3 make autoconf g++ flex bison ccache
|
||||||
|
#sudo apt-get install libgoogle-perftools-dev numactl perl-doc
|
||||||
|
#sudo apt-get install libfl2 # Ubuntu only (ignore if gives error)
|
||||||
|
#sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error)
|
||||||
|
#sudo apt-get install zlibc zlib1g zlib1g-dev # Ubuntu only (ignore if gives error)
|
||||||
|
|
||||||
|
git clone https://github.com/verilator/verilator # Only first time
|
||||||
|
## Note the URL above is not a page you can see with a browser, it's for git only
|
||||||
|
|
||||||
|
# Every time you need to build:
|
||||||
|
unsetenv VERILATOR_ROOT # For csh; ignore error if on bash
|
||||||
|
unset VERILATOR_ROOT # For bash
|
||||||
|
cd verilator
|
||||||
|
git pull # Make sure git repository is up-to-date
|
||||||
|
git tag # See what versions exist
|
||||||
|
#git checkout master # Use development branch (e.g. recent bug fixes)
|
||||||
|
#git checkout stable # Use most recent stable release
|
||||||
|
#git checkout v{version} # Switch to specified release version
|
||||||
|
|
||||||
|
autoconf # Create ./configure script
|
||||||
|
./configure # Configure and create Makefile
|
||||||
|
make -j # Build Verilator itself
|
||||||
|
sudo make install
|
||||||
|
|
||||||
|
|
||||||
|
.. _Detailed Build Instructions:
|
||||||
|
|
||||||
|
Detailed Build Instructions
|
||||||
|
===========================
|
||||||
|
|
||||||
|
This section describes details of the build process, and assumes you are
|
||||||
|
building from Git. For using a pre-built binary for your Linux
|
||||||
|
distribution, see instead :ref:`Package Manager Quick Install`.
|
||||||
|
|
||||||
|
|
||||||
|
OS Requirements
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Verilator is developed and has primary testing on Ubuntu, with additional
|
||||||
|
testing on FreeBSD and Apple OS-X. Versions have also built on Redhat
|
||||||
|
Linux, HPUX and Solaris. It should run with minor porting on any
|
||||||
|
GNU/Linux-ish platform. Verilator also works on Windows under Cygwin, and
|
||||||
|
Windows under MinGW (gcc -mno-cygwin). Verilated output (not Verilator
|
||||||
|
itself) compiles under all the options above, plus using MSVC++.
|
||||||
|
|
||||||
|
|
||||||
|
Install Prerequisites
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
To build or run Verilator you need these standard packages:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo apt-get install git perl python3 make
|
||||||
|
sudo apt-get install g++ # Alternatively, clang
|
||||||
|
sudo apt-get install libgz # Non-Ubuntu (ignore if gives error)
|
||||||
|
sudo apt-get install libfl2 # Ubuntu only (ignore if gives error)
|
||||||
|
sudo apt-get install libfl-dev # Ubuntu only (ignore if gives error)
|
||||||
|
sudo apt-get install zlibc zlib1g zlib1g-dev # Ubuntu only (ignore if gives error)
|
||||||
|
|
||||||
|
To build or run the following are optional but should be installed for good
|
||||||
|
performance:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo apt-get install ccache # If present at build, needed for run
|
||||||
|
sudo apt-get install libgoogle-perftools-dev numactl perl-doc
|
||||||
|
|
||||||
|
To build Verilator you will need to install these packages; these do not
|
||||||
|
need to be present to run Verilator:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo apt-get install git autoconf flex bison
|
||||||
|
|
||||||
|
Those developing Verilator itself may also want these (see internals.rst):
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
sudo apt-get install gdb graphviz cmake clang clang-format-11 gprof lcov
|
||||||
|
sudo pip3 install sphinx sphinx_rtd_theme breathe
|
||||||
|
cpan install Pod::Perldoc
|
||||||
|
cpan install Parallel::Forker
|
||||||
|
|
||||||
|
|
||||||
|
Install SystemC
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If you will be using SystemC (vs straight C++ output), download `SystemC
|
||||||
|
<https://www.accellera.org/downloads/standards/systemc>`__. Follow their
|
||||||
|
installation instructions. You will need to set the
|
||||||
|
:option:`SYSTEMC_INCLUDE` environment variable to point to the include
|
||||||
|
directory with ``systemc.h`` in it, and set the :option:`SYSTEMC_LIBDIR`
|
||||||
|
environment variable to point to the directory with ``libsystemc.a`` in it.
|
||||||
|
|
||||||
|
|
||||||
|
Install GTKWave
|
||||||
|
^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
To make use of Verilator FST tracing you will want `GTKwave
|
||||||
|
<http://gtkwave.sourceforge.net/>`__ installed, however this is not
|
||||||
|
required at Verilator build time.
|
||||||
|
|
||||||
|
|
||||||
|
Obtain Sources
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Get the sources from the git repository: (You need do this only once,
|
||||||
|
ever.)
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
git clone https://github.com/verilator/verilator # Only first time
|
||||||
|
## Note the URL above is not a page you can see with a browser, it's for git only
|
||||||
|
|
||||||
|
Enter the checkout and determine what version/branch to use:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
cd verilator
|
||||||
|
git pull # Make sure we're up-to-date
|
||||||
|
git tag # See what versions exist
|
||||||
|
#git checkout master # Use development branch (e.g. recent bug fix)
|
||||||
|
#git checkout stable # Use most recent release
|
||||||
|
#git checkout v{version} # Switch to specified release version
|
||||||
|
|
||||||
|
|
||||||
|
Auto Configure
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Create the configuration script:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
autoconf # Create ./configure script
|
||||||
|
|
||||||
|
|
||||||
|
Eventual Installation Options
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Before configuring the build, you have to decide how you're going to
|
||||||
|
eventually install Verilator onto your system. Verilator will be compiling
|
||||||
|
the current value of the environment variables :option:`VERILATOR_ROOT`,
|
||||||
|
:option:`SYSTEMC_INCLUDE`, and :option:`SYSTEMC_LIBDIR` as defaults into
|
||||||
|
the executable, so they must be correct before configuring.
|
||||||
|
|
||||||
|
These are the installation options:
|
||||||
|
|
||||||
|
|
||||||
|
1. Run-in-Place from VERILATOR_ROOT
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Our personal favorite is to always run Verilator in-place from its Git
|
||||||
|
directory. This allows the easiest experimentation and upgrading, and
|
||||||
|
allows many versions of Verilator to co-exist on a system.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
export VERILATOR_ROOT=`pwd` # if your shell is bash
|
||||||
|
setenv VERILATOR_ROOT `pwd` # if your shell is csh
|
||||||
|
./configure
|
||||||
|
# Running will use files from $VERILATOR_ROOT, so no install needed
|
||||||
|
|
||||||
|
Note after installing (below steps), a calling program or shell must set
|
||||||
|
the environment variable :option:`VERILATOR_ROOT` to point to this Git
|
||||||
|
directory, then execute ``$VERILATOR_ROOT/bin/verilator``, which will find
|
||||||
|
the path to all needed files.
|
||||||
|
|
||||||
|
|
||||||
|
2. Install into a specific location
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You may eventually be installing onto a project/company-wide "CAD" tools
|
||||||
|
disk that may support multiple versions of every tool. Tell configure the
|
||||||
|
eventual destination directory name. We recommend the destination location
|
||||||
|
include the Verilator version name:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
unset VERILATOR_ROOT # if your shell is bash
|
||||||
|
unsetenv VERILATOR_ROOT # if your shell is csh
|
||||||
|
# For the tarball, use the version number instead of git describe
|
||||||
|
./configure --prefix /CAD_DISK/verilator/`git describe | sed "s/verilator_//"`
|
||||||
|
|
||||||
|
Note after installing (below steps), if you use `modulecmd
|
||||||
|
<http://modules.sourceforge.net/>`__, you'll want a module file like the
|
||||||
|
following:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
set install_root /CAD_DISK/verilator/{version-number-used-above}
|
||||||
|
unsetenv VERILATOR_ROOT
|
||||||
|
prepend-path PATH $install_root/bin
|
||||||
|
prepend-path MANPATH $install_root/man
|
||||||
|
prepend-path PKG_CONFIG_PATH $install_root/share/pkgconfig
|
||||||
|
|
||||||
|
|
||||||
|
3. Install into a Specific Path
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You may eventually install Verilator into a specific installation prefix,
|
||||||
|
as most GNU tools support:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
unset VERILATOR_ROOT # if your shell is bash
|
||||||
|
unsetenv VERILATOR_ROOT # if your shell is csh
|
||||||
|
./configure --prefix /opt/verilator-VERSION
|
||||||
|
|
||||||
|
Then after installing (below steps) you will need to add
|
||||||
|
``/opt/verilator-VERSION/bin`` to your ``$PATH`` environment variable.
|
||||||
|
|
||||||
|
|
||||||
|
4. Install System Globally
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The final option is to eventually install Verilator globally, using
|
||||||
|
configure's default system paths:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
unset VERILATOR_ROOT # if your shell is bash
|
||||||
|
unsetenv VERILATOR_ROOT # if your shell is csh
|
||||||
|
./configure
|
||||||
|
|
||||||
|
Then after installing (below) the binaries should be in a location that is
|
||||||
|
already in your ``$PATH`` environment variable.
|
||||||
|
|
||||||
|
|
||||||
|
Configure
|
||||||
|
---------
|
||||||
|
|
||||||
|
The command to configure the package was described in the previous step.
|
||||||
|
Developers should configure to have more complete developer tests.
|
||||||
|
Additional packages may be required for these tests.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
export VERILATOR_AUTHOR_SITE=1 # Put in your .bashrc
|
||||||
|
./configure --enable-longtests ...above options...
|
||||||
|
|
||||||
|
|
||||||
|
Compile
|
||||||
|
-------
|
||||||
|
|
||||||
|
Compile Verilator:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
make -j
|
||||||
|
|
||||||
|
|
||||||
|
Test
|
||||||
|
----
|
||||||
|
|
||||||
|
Check the compilation by running self-tests:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
make test
|
||||||
|
|
||||||
|
|
||||||
|
Install
|
||||||
|
-------
|
||||||
|
|
||||||
|
If you used any install option other than the `1. Run-in-Place from
|
||||||
|
VERILATOR_ROOT <#_1_run_in_place_from_verilator_root>`__ scheme, install
|
||||||
|
the files:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
|
||||||
|
.. Docker Build Environment
|
||||||
|
|
||||||
|
.. include:: ../../ci/docker/buildenv/README.rst
|
||||||
|
|
||||||
|
|
||||||
|
.. Docker Run Environment
|
||||||
|
|
||||||
|
.. include:: ../../ci/docker/run/README.rst
|
||||||
@@ -0,0 +1,477 @@
|
|||||||
|
.. Copyright 2003-2021 by Wilson Snyder.
|
||||||
|
.. SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
||||||
|
|
||||||
|
***************
|
||||||
|
Input Languages
|
||||||
|
***************
|
||||||
|
|
||||||
|
This section describes the languages Verilator takes as input. See also
|
||||||
|
:ref:`Configuration Files`.
|
||||||
|
|
||||||
|
|
||||||
|
Language Standard Support
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Verilog 2001 (IEEE 1364-2001) Support
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
Verilator supports most Verilog 2001 language features. This includes
|
||||||
|
signed numbers, "always @\*", generate statements, multidimensional arrays,
|
||||||
|
localparam, and C-style declarations inside port lists.
|
||||||
|
|
||||||
|
|
||||||
|
Verilog 2005 (IEEE 1364-2005) Support
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
Verilator supports most Verilog 2005 language features. This includes the
|
||||||
|
\`begin_keywords and \`end_keywords compiler directives, $clog2, and the
|
||||||
|
uwire keyword.
|
||||||
|
|
||||||
|
|
||||||
|
SystemVerilog 2005 (IEEE 1800-2005) Support
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Verilator supports ==? and !=? operators, ++ and -- in some contexts,
|
||||||
|
$bits, $countbits, $countones, $error, $fatal, $info, $isunknown, $onehot,
|
||||||
|
$onehot0, $unit, $warning, always_comb, always_ff, always_latch, bit, byte,
|
||||||
|
chandle, const, do-while, enum, export, final, import, int, interface,
|
||||||
|
logic, longint, modport, package, program, shortint, struct, time, typedef,
|
||||||
|
union, var, void, priority case/if, and unique case/if.
|
||||||
|
|
||||||
|
It also supports .name and .\* interconnection.
|
||||||
|
|
||||||
|
Verilator partially supports concurrent assert and cover statements; see
|
||||||
|
the enclosed coverage tests for the syntax which is allowed.
|
||||||
|
|
||||||
|
Verilator has limited support for class and related object-oriented
|
||||||
|
constructs.
|
||||||
|
|
||||||
|
|
||||||
|
SystemVerilog 2012 (IEEE 1800-2012) Support
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Verilator implements a full SystemVerilog-compliant preprocessor, including
|
||||||
|
function call-like preprocessor defines, default define arguments,
|
||||||
|
\`__FILE__, \`__LINE__ and \`undefineall.
|
||||||
|
|
||||||
|
|
||||||
|
SystemVerilog 2017 (IEEE 1800-2017) Support
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
|
Verilator supports the 2017 "for" loop constructs, and several minor
|
||||||
|
cleanups IEEE made in 1800-2017.
|
||||||
|
|
||||||
|
|
||||||
|
Verilog AMS Support
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Verilator implements a very small subset of Verilog AMS (Verilog Analog and
|
||||||
|
Mixed-Signal Extensions) with the subset corresponding to those VMS
|
||||||
|
keywords with near equivalents in the Verilog 2005 or SystemVerilog 2009
|
||||||
|
languages.
|
||||||
|
|
||||||
|
AMS parsing is enabled with :vlopt:`--language VAMS <--language>` or
|
||||||
|
:vlopt:`--language 1800+VAMS <--language>`.
|
||||||
|
|
||||||
|
At present Verilator implements ceil, exp, floor, ln, log, pow, sqrt,
|
||||||
|
string, and wreal.
|
||||||
|
|
||||||
|
|
||||||
|
Synthesis Directive Assertion Support
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
With the :vlopt:`--assert` option, Verilator reads any :code:`//synopsys
|
||||||
|
full_case` or :code:`//synopsys parallel_case` directives. The same
|
||||||
|
applies to any :code:`//ambit synthesis`, :code:`//cadence` or
|
||||||
|
:code:`//pragma` directives of the same form.
|
||||||
|
|
||||||
|
When these synthesis directives are discovered, Verilator will either
|
||||||
|
formally prove the directive to be true, or failing that, will insert the
|
||||||
|
appropriate code to detect failing cases at simulation runtime and print an
|
||||||
|
"Assertion failed" error message.
|
||||||
|
|
||||||
|
Verilator likewise also asserts any "unique" or "priority" SystemVerilog
|
||||||
|
keywords on case statement, as well as "unique" on if statements. However,
|
||||||
|
"priority if" is currently simply ignored.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Language Limitations:
|
||||||
|
|
||||||
|
Language Limitations
|
||||||
|
====================
|
||||||
|
|
||||||
|
This section describes the language limitations of Verilator. Many of these
|
||||||
|
restrictions are by intent.
|
||||||
|
|
||||||
|
Synthesis Subset
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Verilator supports the Synthesis subset with other verification constructs
|
||||||
|
being added over time. Verilator also simulates events as Synopsys's Design
|
||||||
|
Compiler would; namely given a block of the form:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
always @(x) y = x & z;
|
||||||
|
|
||||||
|
This will recompute y when there is even a potential for change in x or a
|
||||||
|
change in z, that is when the flops computing x or z evaluate (which is
|
||||||
|
what Design Compiler will synthesize.) A compliant simulator would only
|
||||||
|
calculate y if x changes. We recommend using always_comb to make the code
|
||||||
|
run the same everywhere. Also avoid putting $displays in combo blocks, as
|
||||||
|
they may print multiple times when not desired, even on compliant
|
||||||
|
simulators as event ordering is not specified.
|
||||||
|
|
||||||
|
|
||||||
|
Signal Naming
|
||||||
|
-------------
|
||||||
|
|
||||||
|
To avoid conflicts with C symbol naming, any character in a signal name
|
||||||
|
that is not alphanumeric nor a single underscore will be replaced by __0hh
|
||||||
|
where hh is the hex code of the character. To avoid conflicts with
|
||||||
|
Verilator's internal symbols, any double underscore are replaced with
|
||||||
|
___05F (5F is the hex code of an underscore.)
|
||||||
|
|
||||||
|
|
||||||
|
Bind
|
||||||
|
----
|
||||||
|
|
||||||
|
sVerilator only supports bind to a target module name, not to an
|
||||||
|
instance path.
|
||||||
|
|
||||||
|
|
||||||
|
Class
|
||||||
|
-----
|
||||||
|
|
||||||
|
Verilator class support is limited but in active development. Verilator
|
||||||
|
supports members, and methods. Verilator does not support class static
|
||||||
|
members, class extend, or class parameters.
|
||||||
|
|
||||||
|
|
||||||
|
Dotted cross-hierarchy references
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Verilator supports dotted references to variables, functions and tasks in
|
||||||
|
different modules. The portion before the dot must have a constant value;
|
||||||
|
for example a[2].b is acceptable, while a[x].b is generally not.
|
||||||
|
|
||||||
|
References into generated and arrayed instances use the instance names
|
||||||
|
specified in the Verilog standard; arrayed instances are named
|
||||||
|
``{instanceName}[{instanceNumber}]`` in Verilog, which becomes
|
||||||
|
``{instanceName}__BRA__{instanceNumber}__KET__`` inside the generated C++
|
||||||
|
code.
|
||||||
|
|
||||||
|
|
||||||
|
Latches
|
||||||
|
-------
|
||||||
|
|
||||||
|
Verilator is optimized for edge sensitive (flop based) designs. It will
|
||||||
|
attempt to do the correct thing for latches, but most performance
|
||||||
|
optimizations will be disabled around the latch.
|
||||||
|
|
||||||
|
|
||||||
|
Structures and Unions
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Presently Verilator only supports packed structs and packed unions. Rand
|
||||||
|
and randc tags on members are simply ignored. All structures and unions
|
||||||
|
are represented as a single vector, which means that generating one member
|
||||||
|
of a structure from blocking, and another from non-blocking assignments is
|
||||||
|
unsupported.
|
||||||
|
|
||||||
|
|
||||||
|
Time
|
||||||
|
----
|
||||||
|
|
||||||
|
All delays (#) are ignored, as they are in synthesis.
|
||||||
|
|
||||||
|
|
||||||
|
.. _Unknown States:
|
||||||
|
|
||||||
|
Unknown States
|
||||||
|
--------------
|
||||||
|
|
||||||
|
Verilator is mostly a two state simulator, not a four state simulator.
|
||||||
|
However, it has two features which uncover most initialization bugs
|
||||||
|
(including many that a four state simulator will miss.)
|
||||||
|
|
||||||
|
Identity comparisons (=== or !==) are converted to standard ==/!= when
|
||||||
|
neither side is a constant. This may make the expression yield a different
|
||||||
|
result compared to a four state simulator. An === comparison to X will
|
||||||
|
always be false, so that Verilog code which checks for uninitialized logic
|
||||||
|
will not fire.
|
||||||
|
|
||||||
|
Assigning X to a variable will actually assign a constant value as
|
||||||
|
determined by the :vlopt:`--x-assign` option. This allows runtime
|
||||||
|
randomization, thus if the value is actually used, the random value should
|
||||||
|
cause downstream errors. Integers also get randomized, even though the
|
||||||
|
Verilog 2001 specification says they initialize to zero. Note however that
|
||||||
|
randomization happens at initialization time and hence during a single
|
||||||
|
simulation run, the same constant (but random) value will be used every
|
||||||
|
time the assignment is executed.
|
||||||
|
|
||||||
|
All variables, depending on :vlopt:`--x-initial` setting, are typically
|
||||||
|
randomly initialized using a function. By running several random
|
||||||
|
simulation runs you can determine that reset is working correctly. On the
|
||||||
|
first run, have the function initialize variables to zero. On the second,
|
||||||
|
have it initialize variables to one. On the third and following runs have
|
||||||
|
it initialize them randomly. If the results match, reset works. (Note
|
||||||
|
this is what the hardware will really do.) In practice, just setting all
|
||||||
|
variables to one at startup finds most problems (since typically control
|
||||||
|
signals are active-high).
|
||||||
|
|
||||||
|
:vlopt:`--x-assign` applies to variables explicitly initialized or assigned
|
||||||
|
an X. Uninitialized clocks are initialized to zero, while all other state
|
||||||
|
holding variables are initialized to a random value. Event driven
|
||||||
|
simulators will generally trigger an edge on a transition from X to 1
|
||||||
|
(posedge) or X to 0 (negedge). However, by default, since clocks are
|
||||||
|
initialized to zero, Verilator will not trigger an initial negedge. Some
|
||||||
|
code (particularly for reset) may rely on X->0 triggering an edge. The
|
||||||
|
:vlopt:`--x-initial-edge` option enables this behavior. Comparing runs with
|
||||||
|
and without this option will find such problems.
|
||||||
|
|
||||||
|
|
||||||
|
Tri/Inout
|
||||||
|
---------
|
||||||
|
|
||||||
|
Verilator converts some simple tristate structures into two state. Pullup,
|
||||||
|
pulldown, bufif0, bufif1, notif0, notif1, pmos, nmos, tri0 and tri1 are
|
||||||
|
also supported. Simple comparisons with :code:`=== 1'bz` are also
|
||||||
|
supported.
|
||||||
|
|
||||||
|
An assignment of the form:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
inout driver;
|
||||||
|
wire driver = (enable) ? output_value : 1'bz;
|
||||||
|
|
||||||
|
Will be converted to:
|
||||||
|
|
||||||
|
.. code-block:: sv
|
||||||
|
|
||||||
|
input driver; // Value being driven in from "external" drivers
|
||||||
|
output driver__en; // True if driven from this module
|
||||||
|
output driver__out; // Value being driven from this module
|
||||||
|
|
||||||
|
External logic will be needed to combine these signals with any external
|
||||||
|
drivers.
|
||||||
|
|
||||||
|
Tristate drivers are not supported inside functions and tasks; an inout
|
||||||
|
there will be considered a two state variable that is read and written
|
||||||
|
instead of a four state variable.
|
||||||
|
|
||||||
|
|
||||||
|
Functions & Tasks
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
All functions and tasks will be inlined (will not become functions in C.)
|
||||||
|
The only support provided is for simple statements in tasks (which may
|
||||||
|
affect global variables).
|
||||||
|
|
||||||
|
Recursive functions and tasks are not supported. All inputs and outputs
|
||||||
|
are automatic, as if they had the Verilog 2001 "automatic" keyword
|
||||||
|
prepended. (If you don't know what this means, Verilator will do what you
|
||||||
|
probably expect, what C does. The default behavior of Verilog is
|
||||||
|
different.)
|
||||||
|
|
||||||
|
|
||||||
|
Generated Clocks
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Verilator attempts to deal with generated and gated clocks correctly,
|
||||||
|
however some cases cause problems in the scheduling algorithm which is
|
||||||
|
optimized for performance. The safest option is to have all clocks as
|
||||||
|
primary inputs to the model, or wires directly attached to primary inputs.
|
||||||
|
For proper behavior clock enables may also need the
|
||||||
|
:option:`/*verilator&32;clock_enable*/` metacomment.
|
||||||
|
|
||||||
|
|
||||||
|
Gate Primitives
|
||||||
|
---------------
|
||||||
|
|
||||||
|
The 2-state gate primitives (and, buf, nand, nor, not, or, xnor, xor) are
|
||||||
|
directly converted to behavioral equivalents. The 3-state and MOS gate
|
||||||
|
primitives are not supported. Tables are not supported.
|
||||||
|
|
||||||
|
|
||||||
|
Specify blocks
|
||||||
|
--------------
|
||||||
|
|
||||||
|
All specify blocks and timing checks are ignored. All min:typ:max delays
|
||||||
|
use the typical value.
|
||||||
|
|
||||||
|
|
||||||
|
Array Initialization
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
When initializing a large array, you need to use non-delayed assignments.
|
||||||
|
Verilator will tell you when this needs to be fixed; see the BLKLOOPINIT
|
||||||
|
error for more information.
|
||||||
|
|
||||||
|
|
||||||
|
Array Out of Bounds
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
Writing a memory element that is outside the bounds specified for the array
|
||||||
|
may cause a different memory element inside the array to be written
|
||||||
|
instead. For power-of-2 sized arrays, Verilator will give a width warning
|
||||||
|
and the address. For non-power-of-2-sizes arrays, index 0 will be written.
|
||||||
|
|
||||||
|
Reading a memory element that is outside the bounds specified for the array
|
||||||
|
will give a width warning and wrap around the power-of-2 size. For
|
||||||
|
non-power-of-2 sizes, it will return a unspecified constant of the
|
||||||
|
appropriate width.
|
||||||
|
|
||||||
|
|
||||||
|
Assertions
|
||||||
|
----------
|
||||||
|
|
||||||
|
Verilator is beginning to add support for assertions. Verilator currently
|
||||||
|
only converts assertions to simple :code:`if (...) error` statements, and
|
||||||
|
coverage statements to increment the line counters described in the
|
||||||
|
coverage section.
|
||||||
|
|
||||||
|
Verilator does not support SEREs yet. All assertion and coverage
|
||||||
|
statements must be simple expressions that complete in one cycle.
|
||||||
|
|
||||||
|
|
||||||
|
Encrypted Verilog
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Open source simulators like Verilator are unable to use encrypted RTL
|
||||||
|
(i.e. IEEE P1735). Talk to your IP vendor about delivering IP blocks via
|
||||||
|
Verilator's :vlopt:`--protect-lib` feature.
|
||||||
|
|
||||||
|
|
||||||
|
Language Keyword Limitations
|
||||||
|
============================
|
||||||
|
|
||||||
|
This section describes specific limitations for each language keyword.
|
||||||
|
|
||||||
|
.. Hack to get long definition list:
|
||||||
|
.. |cmdslong1| replace:: \`__FILE__, \`__LINE__, \`begin_keywords,
|
||||||
|
\`begin_keywords, \`begin_keywords, \`begin_keywords, \`begin_keywords,
|
||||||
|
\`define, \`else, \`elsif, \`end_keywords, \`endif, \`error, \`ifdef,
|
||||||
|
\`ifndef, \`include, \`line, \`systemc_ctor, \`systemc_dtor,
|
||||||
|
\`systemc_header, \`systemc_imp_header, \`systemc_implementation,
|
||||||
|
\`systemc_interface, \`undef, \`verilog
|
||||||
|
|
||||||
|
|cmdslong1|
|
||||||
|
Fully supported.
|
||||||
|
|
||||||
|
|
||||||
|
.. Hack to get long definition list:
|
||||||
|
|
||||||
|
.. |cmdslong2| replace:: always, always_comb, always_ff, always_latch, and,
|
||||||
|
assign, begin, buf, byte, case, casex, casez, default, defparam,
|
||||||
|
do-while, else, end, endcase, endfunction, endgenerate, endmodule,
|
||||||
|
endspecify, endtask, final, for, function, generate, genvar, if,
|
||||||
|
initial, inout, input, int, integer, localparam, logic, longint,
|
||||||
|
macromodule, module, nand, negedge, nor, not, or, output, parameter,
|
||||||
|
posedge, reg, scalared, shortint, signed, supply0, supply1, task, time,
|
||||||
|
tri, typedef, var, vectored, while, wire, xnor, xor
|
||||||
|
|
||||||
|
|cmdslong2|
|
||||||
|
Generally supported.
|
||||||
|
|
||||||
|
++, -- operators
|
||||||
|
Increment/decrement can only be used as standalone statements or in
|
||||||
|
certain limited cases.
|
||||||
|
|
||||||
|
'{} operator
|
||||||
|
Assignment patterns with order based, default, constant integer (array)
|
||||||
|
or member identifier (struct/union) keys are supported. Data type keys
|
||||||
|
and keys which are computed from a constant expression are not supported.
|
||||||
|
|
||||||
|
\`uselib
|
||||||
|
Uselib, a vendor specific library specification method, is ignored along
|
||||||
|
with anything following it until the end of that line.
|
||||||
|
|
||||||
|
cast operator
|
||||||
|
Casting is supported only between simple scalar types, signed and
|
||||||
|
unsigned, not arrays nor structs.
|
||||||
|
|
||||||
|
chandle
|
||||||
|
Treated as a "longint"; does not yet warn about operations that are
|
||||||
|
specified as illegal on chandles.
|
||||||
|
|
||||||
|
disable
|
||||||
|
Disable statements may be used only if the block being disabled is a
|
||||||
|
block the disable statement itself is inside. This was commonly used to
|
||||||
|
provide loop break and continue functionality before SystemVerilog added
|
||||||
|
the break and continue keywords.
|
||||||
|
|
||||||
|
inside
|
||||||
|
Inside expressions may not include unpacked array traversal or $ as an
|
||||||
|
upper bound. Case inside and case matches are also unsupported.
|
||||||
|
|
||||||
|
interface
|
||||||
|
Interfaces and modports, including with generated data types are
|
||||||
|
supported. Generate blocks around modports are not supported, nor are
|
||||||
|
virtual interfaces nor unnamed interfaces.
|
||||||
|
|
||||||
|
shortreal
|
||||||
|
Short floating point (shortreal) numbers are converted to real. Most
|
||||||
|
other simulators either do not support float, or convert likewise.
|
||||||
|
|
||||||
|
specify specparam
|
||||||
|
All specify blocks and timing checks are ignored.
|
||||||
|
|
||||||
|
uwire
|
||||||
|
Verilator does not perform warning checking on uwires, it treats the
|
||||||
|
uwire keyword as if it were the normal wire keyword.
|
||||||
|
|
||||||
|
$bits, $countbits, $countones, $finish, $isunknown, $onehot, $onehot0, $signed, $stime, $stop, $time, $unsigned,
|
||||||
|
Generally supported.
|
||||||
|
|
||||||
|
$dump/$dumpports and related
|
||||||
|
$dumpfile or $dumpports will create a VCD or FST file (which is based on
|
||||||
|
the :vlopt:`--trace` option given when the model was Verilated). This
|
||||||
|
will take effect starting at the next eval() call. If you have multiple
|
||||||
|
Verilated designs under the same C model, then this will dump signals
|
||||||
|
only from the design containing the $dumpvars.
|
||||||
|
|
||||||
|
$dumpvars and $dumpports module identifier is ignored; the traced
|
||||||
|
instances will always start at the top of the design. The levels argument
|
||||||
|
is also ignored, use tracing_on/tracing_off pragmas instead.
|
||||||
|
|
||||||
|
$dumpportson/$dumpportsoff/$dumpportsall/$dumpportslimit filename
|
||||||
|
argument is ignored, only a single trace file may be active at once.
|
||||||
|
|
||||||
|
$dumpall/$dumpportsall, $dumpon/$dumpportson, $dumpoff/$dumpportsoff, and
|
||||||
|
$dumplimit/$dumpportlimit are currently ignored.
|
||||||
|
|
||||||
|
$error, $fatal, $info, $warning.
|
||||||
|
Generally supported.
|
||||||
|
|
||||||
|
$exit, $finish, $stop
|
||||||
|
The rarely used optional parameter to $finish and $stop is ignored. $exit
|
||||||
|
is aliased to $finish.
|
||||||
|
|
||||||
|
$fopen, $fclose, $fdisplay, $ferror, $feof, $fflush, $fgetc, $fgets, $fscanf, $fwrite, $fscanf, $sscanf
|
||||||
|
Generally supported.
|
||||||
|
|
||||||
|
$fullskew, $hold, $nochange, $period, $recovery, $recrem, $removal, $setup, $setuphold, $skew, $timeskew, $width
|
||||||
|
All specify blocks and timing checks are ignored.
|
||||||
|
|
||||||
|
$random, $urandom, $urandom_range
|
||||||
|
Use :vlopt:`+verilator+seed+\<value\>` runtime option to set the seed if
|
||||||
|
there is no $random nor $urandom optional argument to set the seed.
|
||||||
|
There is one random seed per C thread, not per module for $random, nor
|
||||||
|
per object for random stability of $urandom/$urandom_range.
|
||||||
|
|
||||||
|
$readmemb, $readmemh
|
||||||
|
Read memory commands are supported. Note Verilator and the Verilog
|
||||||
|
specification does not include support for readmem to multi-dimensional
|
||||||
|
arrays.
|
||||||
|
|
||||||
|
$test$plusargs, $value$plusargs
|
||||||
|
Supported, but the instantiating C++/SystemC wrapper must call
|
||||||
|
|
||||||
|
.. code-block:: C++
|
||||||
|
|
||||||
|
Verilated::commandArgs(argc, argv);
|
||||||
|
|
||||||
|
to register the command line before calling $test$plusargs or
|
||||||
|
$value$plusargs.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user