diff --git a/src/V3EmitCMake.cpp b/src/V3EmitCMake.cpp index 288a576ec..e8ff6e06d 100644 --- a/src/V3EmitCMake.cpp +++ b/src/V3EmitCMake.cpp @@ -169,11 +169,6 @@ class CMakeEmitter final { global.emplace_back("${VERILATOR_ROOT}/include/" + v3Global.opt.traceSourceBase() + "_c.cpp"); if (v3Global.opt.systemC()) { - if (v3Global.opt.traceFormat() != TraceFormat::VCD) { - v3warn(E_UNSUPPORTED, - "Unsupported: This trace format is not supported in SystemC, " - "use VCD format."); - } global.emplace_back("${VERILATOR_ROOT}/include/" + v3Global.opt.traceSourceLang() + ".cpp"); } diff --git a/test_regress/t/t_trace_fst_sc_cmake.out b/test_regress/t/t_trace_fst_sc_cmake.out new file mode 100644 index 000000000..3fe026e70 --- /dev/null +++ b/test_regress/t/t_trace_fst_sc_cmake.out @@ -0,0 +1,1824 @@ +$date + Thu Apr 1 14:28:55 2021 + +$end +$version + fstWriter +$end +$timescale + 1ps +$end +$scope module top $end +$scope module t $end +$var wire 1 ! clk $end +$var int 32 " cyc $end +$var logic 1 # rstn $end +$var real_parameter 64 $ fst_gparam_real $end +$var real_parameter 64 % fst_lparam_real $end +$var real 64 $ fst_real $end +$var integer 32 & fst_integer $end +$var bit 1 ' fst_bit $end +$var logic 1 ( fst_logic $end +$var int 32 ) fst_int $end +$var shortint 16 * fst_shortint $end +$var longint 64 + fst_longint $end +$var byte 8 , fst_byte $end +$var parameter 32 - fst_parameter $end +$var parameter 32 . fst_lparam $end +$var supply0 1 / fst_supply0 $end +$var supply1 1 0 fst_supply1 $end +$var tri0 1 1 fst_tri0 $end +$var tri1 1 2 fst_tri1 $end +$var tri 1 3 fst_tri $end +$var wire 1 4 fst_wire $end +$var logic 5 5 state $end +$scope module test $end +$var wire 1 ! clk $end +$var wire 1 # rstn $end +$var wire 5 5 state $end +$var logic 5 6 state_w $end +$var logic 5 7 state_array(0) $end +$var logic 5 8 state_array(1) $end +$var logic 5 9 state_array(2) $end +$scope module unnamedblk2 $end +$var int 32 : i $end +$upscope $end +$scope module unnamedblk1 $end +$var int 32 ; i $end +$upscope $end +$upscope $end +$upscope $end +$upscope $end +$enddefinitions $end +#0 +$dumpvars +b00000000000000000000000000000000 ; +b00000000000000000000000000000000 : +b00000 9 +b00000 8 +b00000 7 +b00000 6 +b00000 5 +04 +03 +12 +01 +10 +0/ +b00000000000000000000000111001000 . +b00000000000000000000000001111011 - +b00000000 , +b0000000000000000000000000000000000000000000000000000000000000000 + +b0000000000000000 * +b00000000000000000000000000000000 ) +0( +0' +b00000000000000000000000000000000 & +r4.56 % +r1.23 $ +0# +b00000000000000000000000000000000 " +0! +$end +#10 +1! +b00000000000000000000000000000001 " +b00001 5 +b10100 6 +b00001 7 +b00001 8 +b00001 9 +b00000000000000000000000000000011 ; +#11 +#12 +#13 +#14 +#15 +0! +#16 +#17 +#18 +#19 +#20 +1! +b00000000000000000000000000000010 " +#21 +#22 +#23 +#24 +#25 +0! +#26 +#27 +#28 +#29 +#30 +1! +b00000000000000000000000000000011 " +#31 +#32 +#33 +#34 +#35 +0! +#36 +#37 +#38 +#39 +#40 +1! +b00000000000000000000000000000100 " +#41 +#42 +#43 +#44 +#45 +0! +#46 +#47 +#48 +#49 +#50 +1! +b00000000000000000000000000000101 " +#51 +#52 +#53 +#54 +#55 +0! +#56 +#57 +#58 +#59 +#60 +1! +b00000000000000000000000000000110 " +#61 +#62 +#63 +#64 +#65 +0! +#66 +#67 +#68 +#69 +#70 +1! +b00000000000000000000000000000111 " +#71 +#72 +#73 +#74 +#75 +0! +#76 +#77 +#78 +#79 +#80 +1! +b00000000000000000000000000001000 " +#81 +#82 +#83 +#84 +#85 +0! +#86 +#87 +#88 +#89 +#90 +1! +b00000000000000000000000000001001 " +#91 +#92 +#93 +#94 +#95 +0! +#96 +#97 +#98 +#99 +#100 +1! +b00000000000000000000000000001010 " +#101 +#102 +#103 +#104 +#105 +0! +#106 +#107 +#108 +#109 +#110 +1! +b00000000000000000000000000001011 " +1# +#111 +#112 +#113 +#114 +#115 +0! +#116 +#117 +#118 +#119 +#120 +1! +b00000000000000000000000000001100 " +b10100 9 +b01010 6 +b00000000000000000000000000000010 : +#121 +#122 +#123 +#124 +#125 +0! +#126 +#127 +#128 +#129 +#130 +1! +b00101 6 +b01010 9 +b00000000000000000000000000001101 " +b10100 8 +#131 +#132 +#133 +#134 +#135 +0! +#136 +#137 +#138 +#139 +#140 +1! +b01010 8 +b00000000000000000000000000001110 " +b00101 9 +b10110 6 +b10100 7 +b10100 5 +#141 +#142 +#143 +#144 +#145 +0! +#146 +#147 +#148 +#149 +#150 +1! +b01010 5 +b01010 7 +b01011 6 +b10110 9 +b00000000000000000000000000001111 " +b00101 8 +#151 +#152 +#153 +#154 +#155 +0! +#156 +#157 +#158 +#159 +#160 +1! +b10110 8 +b00000000000000000000000000010000 " +b01011 9 +b10001 6 +b00101 7 +b00101 5 +#161 +#162 +#163 +#164 +#165 +0! +#166 +#167 +#168 +#169 +#170 +1! +b10110 5 +b10110 7 +b11100 6 +b10001 9 +b00000000000000000000000000010001 " +b01011 8 +#171 +#172 +#173 +#174 +#175 +0! +#176 +#177 +#178 +#179 +#180 +1! +b10001 8 +b00000000000000000000000000010010 " +b11100 9 +b01110 6 +b01011 7 +b01011 5 +#181 +#182 +#183 +#184 +#185 +0! +#186 +#187 +#188 +#189 +#190 +1! +b10001 5 +b10001 7 +b00111 6 +b01110 9 +b00000000000000000000000000010011 " +b11100 8 +#191 +#192 +#193 +#194 +#195 +0! +#196 +#197 +#198 +#199 +#200 +1! +b01110 8 +b00000000000000000000000000010100 " +b00111 9 +b10111 6 +b11100 7 +b11100 5 +#201 +#202 +#203 +#204 +#205 +0! +#206 +#207 +#208 +#209 +#210 +1! +b01110 5 +b01110 7 +b11111 6 +b10111 9 +b00000000000000000000000000010101 " +b00111 8 +#211 +#212 +#213 +#214 +#215 +0! +#216 +#217 +#218 +#219 +#220 +1! +b10111 8 +b00000000000000000000000000010110 " +b11111 9 +b11011 6 +b00111 7 +b00111 5 +#221 +#222 +#223 +#224 +#225 +0! +#226 +#227 +#228 +#229 +#230 +1! +b10111 5 +b10111 7 +b11001 6 +b11011 9 +b00000000000000000000000000010111 " +b11111 8 +#231 +#232 +#233 +#234 +#235 +0! +#236 +#237 +#238 +#239 +#240 +1! +b11011 8 +b00000000000000000000000000011000 " +b11001 9 +b11000 6 +b11111 7 +b11111 5 +#241 +#242 +#243 +#244 +#245 +0! +#246 +#247 +#248 +#249 +#250 +1! +b11011 5 +b11011 7 +b01100 6 +b11000 9 +b00000000000000000000000000011001 " +b11001 8 +#251 +#252 +#253 +#254 +#255 +0! +#256 +#257 +#258 +#259 +#260 +1! +b11000 8 +b00000000000000000000000000011010 " +b01100 9 +b00110 6 +b11001 7 +b11001 5 +#261 +#262 +#263 +#264 +#265 +0! +#266 +#267 +#268 +#269 +#270 +1! +b11000 5 +b11000 7 +b00011 6 +b00110 9 +b00000000000000000000000000011011 " +b01100 8 +#271 +#272 +#273 +#274 +#275 +0! +#276 +#277 +#278 +#279 +#280 +1! +b00110 8 +b00000000000000000000000000011100 " +b00011 9 +b10101 6 +b01100 7 +b01100 5 +#281 +#282 +#283 +#284 +#285 +0! +#286 +#287 +#288 +#289 +#290 +1! +b00110 5 +b00110 7 +b11110 6 +b10101 9 +b00000000000000000000000000011101 " +b00011 8 +#291 +#292 +#293 +#294 +#295 +0! +#296 +#297 +#298 +#299 +#300 +1! +b10101 8 +b00000000000000000000000000011110 " +b11110 9 +b01111 6 +b00011 7 +b00011 5 +#301 +#302 +#303 +#304 +#305 +0! +#306 +#307 +#308 +#309 +#310 +1! +b10101 5 +b10101 7 +b10011 6 +b01111 9 +b00000000000000000000000000011111 " +b11110 8 +#311 +#312 +#313 +#314 +#315 +0! +#316 +#317 +#318 +#319 +#320 +1! +b01111 8 +b00000000000000000000000000100000 " +b10011 9 +b11101 6 +b11110 7 +b11110 5 +#321 +#322 +#323 +#324 +#325 +0! +#326 +#327 +#328 +#329 +#330 +1! +b01111 5 +b01111 7 +b11010 6 +b11101 9 +b00000000000000000000000000100001 " +b10011 8 +#331 +#332 +#333 +#334 +#335 +0! +#336 +#337 +#338 +#339 +#340 +1! +b11101 8 +b00000000000000000000000000100010 " +b11010 9 +b01101 6 +b10011 7 +b10011 5 +#341 +#342 +#343 +#344 +#345 +0! +#346 +#347 +#348 +#349 +#350 +1! +b11101 5 +b11101 7 +b10010 6 +b01101 9 +b00000000000000000000000000100011 " +b11010 8 +#351 +#352 +#353 +#354 +#355 +0! +#356 +#357 +#358 +#359 +#360 +1! +b01101 8 +b00000000000000000000000000100100 " +b10010 9 +b01001 6 +b11010 7 +b11010 5 +#361 +#362 +#363 +#364 +#365 +0! +#366 +#367 +#368 +#369 +#370 +1! +b01101 5 +b01101 7 +b10000 6 +b01001 9 +b00000000000000000000000000100101 " +b10010 8 +#371 +#372 +#373 +#374 +#375 +0! +#376 +#377 +#378 +#379 +#380 +1! +b01001 8 +b00000000000000000000000000100110 " +b10000 9 +b01000 6 +b10010 7 +b10010 5 +#381 +#382 +#383 +#384 +#385 +0! +#386 +#387 +#388 +#389 +#390 +1! +b01001 5 +b01001 7 +b00100 6 +b01000 9 +b00000000000000000000000000100111 " +b10000 8 +#391 +#392 +#393 +#394 +#395 +0! +#396 +#397 +#398 +#399 +#400 +1! +b01000 8 +b00000000000000000000000000101000 " +b00100 9 +b00010 6 +b10000 7 +b10000 5 +#401 +#402 +#403 +#404 +#405 +0! +#406 +#407 +#408 +#409 +#410 +1! +b01000 5 +b01000 7 +b00001 6 +b00010 9 +b00000000000000000000000000101001 " +b00100 8 +#411 +#412 +#413 +#414 +#415 +0! +#416 +#417 +#418 +#419 +#420 +1! +b00010 8 +b00000000000000000000000000101010 " +b00001 9 +b10100 6 +b00100 7 +b00100 5 +#421 +#422 +#423 +#424 +#425 +0! +#426 +#427 +#428 +#429 +#430 +1! +b00010 5 +b00010 7 +b01010 6 +b10100 9 +b00000000000000000000000000101011 " +b00001 8 +#431 +#432 +#433 +#434 +#435 +0! +#436 +#437 +#438 +#439 +#440 +1! +b10100 8 +b00000000000000000000000000101100 " +b01010 9 +b00101 6 +b00001 7 +b00001 5 +#441 +#442 +#443 +#444 +#445 +0! +#446 +#447 +#448 +#449 +#450 +1! +b10100 5 +b10100 7 +b10110 6 +b00101 9 +b00000000000000000000000000101101 " +b01010 8 +#451 +#452 +#453 +#454 +#455 +0! +#456 +#457 +#458 +#459 +#460 +1! +b00101 8 +b00000000000000000000000000101110 " +b10110 9 +b01011 6 +b01010 7 +b01010 5 +#461 +#462 +#463 +#464 +#465 +0! +#466 +#467 +#468 +#469 +#470 +1! +b00101 5 +b00101 7 +b10001 6 +b01011 9 +b00000000000000000000000000101111 " +b10110 8 +#471 +#472 +#473 +#474 +#475 +0! +#476 +#477 +#478 +#479 +#480 +1! +b01011 8 +b00000000000000000000000000110000 " +b10001 9 +b11100 6 +b10110 7 +b10110 5 +#481 +#482 +#483 +#484 +#485 +0! +#486 +#487 +#488 +#489 +#490 +1! +b01011 5 +b01011 7 +b01110 6 +b11100 9 +b00000000000000000000000000110001 " +b10001 8 +#491 +#492 +#493 +#494 +#495 +0! +#496 +#497 +#498 +#499 +#500 +1! +b11100 8 +b00000000000000000000000000110010 " +b01110 9 +b00111 6 +b10001 7 +b10001 5 +#501 +#502 +#503 +#504 +#505 +0! +#506 +#507 +#508 +#509 +#510 +1! +b11100 5 +b11100 7 +b10111 6 +b00111 9 +b00000000000000000000000000110011 " +b01110 8 +#511 +#512 +#513 +#514 +#515 +0! +#516 +#517 +#518 +#519 +#520 +1! +b00111 8 +b00000000000000000000000000110100 " +b10111 9 +b11111 6 +b01110 7 +b01110 5 +#521 +#522 +#523 +#524 +#525 +0! +#526 +#527 +#528 +#529 +#530 +1! +b00111 5 +b00111 7 +b11011 6 +b11111 9 +b00000000000000000000000000110101 " +b10111 8 +#531 +#532 +#533 +#534 +#535 +0! +#536 +#537 +#538 +#539 +#540 +1! +b11111 8 +b00000000000000000000000000110110 " +b11011 9 +b11001 6 +b10111 7 +b10111 5 +#541 +#542 +#543 +#544 +#545 +0! +#546 +#547 +#548 +#549 +#550 +1! +b11111 5 +b11111 7 +b11000 6 +b11001 9 +b00000000000000000000000000110111 " +b11011 8 +#551 +#552 +#553 +#554 +#555 +0! +#556 +#557 +#558 +#559 +#560 +1! +b11001 8 +b00000000000000000000000000111000 " +b11000 9 +b01100 6 +b11011 7 +b11011 5 +#561 +#562 +#563 +#564 +#565 +0! +#566 +#567 +#568 +#569 +#570 +1! +b11001 5 +b11001 7 +b00110 6 +b01100 9 +b00000000000000000000000000111001 " +b11000 8 +#571 +#572 +#573 +#574 +#575 +0! +#576 +#577 +#578 +#579 +#580 +1! +b01100 8 +b00000000000000000000000000111010 " +b00110 9 +b00011 6 +b11000 7 +b11000 5 +#581 +#582 +#583 +#584 +#585 +0! +#586 +#587 +#588 +#589 +#590 +1! +b01100 5 +b01100 7 +b10101 6 +b00011 9 +b00000000000000000000000000111011 " +b00110 8 +#591 +#592 +#593 +#594 +#595 +0! +#596 +#597 +#598 +#599 +#600 +1! +b00011 8 +b00000000000000000000000000111100 " +b10101 9 +b11110 6 +b00110 7 +b00110 5 +#601 +#602 +#603 +#604 +#605 +0! +#606 +#607 +#608 +#609 +#610 +1! +b00011 5 +b00011 7 +b01111 6 +b11110 9 +b00000000000000000000000000111101 " +b10101 8 +#611 +#612 +#613 +#614 +#615 +0! +#616 +#617 +#618 +#619 +#620 +1! +b11110 8 +b00000000000000000000000000111110 " +b01111 9 +b10011 6 +b10101 7 +b10101 5 +#621 +#622 +#623 +#624 +#625 +0! +#626 +#627 +#628 +#629 +#630 +1! +b11110 5 +b11110 7 +b11101 6 +b10011 9 +b00000000000000000000000000111111 " +b01111 8 +#631 +#632 +#633 +#634 +#635 +0! +#636 +#637 +#638 +#639 +#640 +1! +b10011 8 +b00000000000000000000000001000000 " +b11101 9 +b11010 6 +b01111 7 +b01111 5 +#641 +#642 +#643 +#644 +#645 +0! +#646 +#647 +#648 +#649 +#650 +1! +b10011 5 +b10011 7 +b01101 6 +b11010 9 +b00000000000000000000000001000001 " +b11101 8 +#651 +#652 +#653 +#654 +#655 +0! +#656 +#657 +#658 +#659 +#660 +1! +b11010 8 +b00000000000000000000000001000010 " +b01101 9 +b10010 6 +b11101 7 +b11101 5 +#661 +#662 +#663 +#664 +#665 +0! +#666 +#667 +#668 +#669 +#670 +1! +b11010 5 +b11010 7 +b01001 6 +b10010 9 +b00000000000000000000000001000011 " +b01101 8 +#671 +#672 +#673 +#674 +#675 +0! +#676 +#677 +#678 +#679 +#680 +1! +b10010 8 +b00000000000000000000000001000100 " +b01001 9 +b10000 6 +b01101 7 +b01101 5 +#681 +#682 +#683 +#684 +#685 +0! +#686 +#687 +#688 +#689 +#690 +1! +b10010 5 +b10010 7 +b01000 6 +b10000 9 +b00000000000000000000000001000101 " +b01001 8 +#691 +#692 +#693 +#694 +#695 +0! +#696 +#697 +#698 +#699 +#700 +1! +b10000 8 +b00000000000000000000000001000110 " +b01000 9 +b00100 6 +b01001 7 +b01001 5 +#701 +#702 +#703 +#704 +#705 +0! +#706 +#707 +#708 +#709 +#710 +1! +b10000 5 +b10000 7 +b00010 6 +b00100 9 +b00000000000000000000000001000111 " +b01000 8 +#711 +#712 +#713 +#714 +#715 +0! +#716 +#717 +#718 +#719 +#720 +1! +b00100 8 +b00000000000000000000000001001000 " +b00010 9 +b00001 6 +b01000 7 +b01000 5 +#721 +#722 +#723 +#724 +#725 +0! +#726 +#727 +#728 +#729 +#730 +1! +b00100 5 +b00100 7 +b10100 6 +b00001 9 +b00000000000000000000000001001001 " +b00010 8 +#731 +#732 +#733 +#734 +#735 +0! +#736 +#737 +#738 +#739 +#740 +1! +b00001 8 +b00000000000000000000000001001010 " +b10100 9 +b01010 6 +b00010 7 +b00010 5 +#741 +#742 +#743 +#744 +#745 +0! +#746 +#747 +#748 +#749 +#750 +1! +b00001 5 +b00001 7 +b00101 6 +b01010 9 +b00000000000000000000000001001011 " +b10100 8 +#751 +#752 +#753 +#754 +#755 +0! +#756 +#757 +#758 +#759 +#760 +1! +b01010 8 +b00000000000000000000000001001100 " +b00101 9 +b10110 6 +b10100 7 +b10100 5 +#761 +#762 +#763 +#764 +#765 +0! +#766 +#767 +#768 +#769 +#770 +1! +b01010 5 +b01010 7 +b01011 6 +b10110 9 +b00000000000000000000000001001101 " +b00101 8 +#771 +#772 +#773 +#774 +#775 +0! +#776 +#777 +#778 +#779 +#780 +1! +b10110 8 +b00000000000000000000000001001110 " +b01011 9 +b10001 6 +b00101 7 +b00101 5 +#781 +#782 +#783 +#784 +#785 +0! +#786 +#787 +#788 +#789 +#790 +1! +b10110 5 +b10110 7 +b11100 6 +b10001 9 +b00000000000000000000000001001111 " +b01011 8 +#791 +#792 +#793 +#794 +#795 +0! +#796 +#797 +#798 +#799 +#800 +1! +b10001 8 +b00000000000000000000000001010000 " +b11100 9 +b01110 6 +b01011 7 +b01011 5 +#801 +#802 +#803 +#804 +#805 +0! +#806 +#807 +#808 +#809 +#810 +1! +b10001 5 +b10001 7 +b00111 6 +b01110 9 +b00000000000000000000000001010001 " +b11100 8 +#811 +#812 +#813 +#814 +#815 +0! +#816 +#817 +#818 +#819 +#820 +1! +b01110 8 +b00000000000000000000000001010010 " +b00111 9 +b10111 6 +b11100 7 +b11100 5 +#821 +#822 +#823 +#824 +#825 +0! +#826 +#827 +#828 +#829 +#830 +1! +b01110 5 +b01110 7 +b11111 6 +b10111 9 +b00000000000000000000000001010011 " +b00111 8 +#831 +#832 +#833 +#834 +#835 +0! +#836 +#837 +#838 +#839 +#840 +1! +b10111 8 +b00000000000000000000000001010100 " +b11111 9 +b11011 6 +b00111 7 +b00111 5 +#841 +#842 +#843 +#844 +#845 +0! +#846 +#847 +#848 +#849 +#850 +1! +b10111 5 +b10111 7 +b11001 6 +b11011 9 +b00000000000000000000000001010101 " +b11111 8 +#851 +#852 +#853 +#854 +#855 +0! +#856 +#857 +#858 +#859 +#860 +1! +b11011 8 +b00000000000000000000000001010110 " +b11001 9 +b11000 6 +b11111 7 +b11111 5 +#861 +#862 +#863 +#864 +#865 +0! +#866 +#867 +#868 +#869 +#870 +1! +b11011 5 +b11011 7 +b01100 6 +b11000 9 +b00000000000000000000000001010111 " +b11001 8 +#871 +#872 +#873 +#874 +#875 +0! +#876 +#877 +#878 +#879 +#880 +1! +b11000 8 +b00000000000000000000000001011000 " +b01100 9 +b00110 6 +b11001 7 +b11001 5 +#881 +#882 +#883 +#884 +#885 +0! +#886 +#887 +#888 +#889 +#890 +1! +b11000 5 +b11000 7 +b00011 6 +b00110 9 +b00000000000000000000000001011001 " +b01100 8 +#891 +#892 +#893 +#894 +#895 +0! +#896 +#897 +#898 +#899 +#900 +1! +b00110 8 +b00000000000000000000000001011010 " +b00011 9 +b10101 6 +b01100 7 +b01100 5 +#901 +#902 +#903 +#904 +#905 +0! +#906 +#907 +#908 +#909 +#910 +1! +b00110 5 +b00110 7 +b11110 6 +b10101 9 +b00000000000000000000000001011011 " +b00011 8 +#911 +#912 +#913 +#914 +#915 +0! +#916 +#917 +#918 +#919 +#920 +1! +b10101 8 +b00000000000000000000000001011100 " +b11110 9 +b01111 6 +b00011 7 +b00011 5 +#921 +#922 +#923 +#924 +#925 +0! +#926 +#927 +#928 +#929 +#930 +1! +b10101 5 +b10101 7 +b10011 6 +b01111 9 +b00000000000000000000000001011101 " +b11110 8 +#931 +#932 +#933 +#934 +#935 +0! +#936 +#937 +#938 +#939 +#940 +1! +b01111 8 +b00000000000000000000000001011110 " +b10011 9 +b11101 6 +b11110 7 +b11110 5 +#941 +#942 +#943 +#944 +#945 +0! +#946 +#947 +#948 +#949 +#950 +1! +b01111 5 +b01111 7 +b11010 6 +b11101 9 +b00000000000000000000000001011111 " +b10011 8 +#951 +#952 +#953 +#954 +#955 +0! +#956 +#957 +#958 +#959 +#960 +1! +b11101 8 +b00000000000000000000000001100000 " +b11010 9 +b01101 6 +b10011 7 +b10011 5 +#961 +#962 +#963 +#964 +#965 +0! +#966 +#967 +#968 +#969 +#970 +1! +b11101 5 +b11101 7 +b10010 6 +b01101 9 +b00000000000000000000000001100001 " +b11010 8 +#971 +#972 +#973 +#974 +#975 +0! +#976 +#977 +#978 +#979 +#980 +1! +b01101 8 +b00000000000000000000000001100010 " +b10010 9 +b01001 6 +b11010 7 +b11010 5 +#981 +#982 +#983 +#984 +#985 +0! +#986 +#987 +#988 +#989 +#990 +1! +b01101 5 +b01101 7 +b10000 6 +b01001 9 +b00000000000000000000000001100011 " +b10010 8 +#991 +#992 +#993 +#994 +#995 +0! +#996 +#997 +#998 +#999 +#1000 +1! +b01001 8 +b00000000000000000000000001100100 " +b10000 9 +b01000 6 +b10010 7 +b10010 5 +#1001 +#1002 +#1003 +#1004 diff --git a/test_regress/t/t_trace_fst_sc_cmake.pl b/test_regress/t/t_trace_fst_sc_cmake.pl new file mode 100755 index 000000000..9764d6bf0 --- /dev/null +++ b/test_regress/t/t_trace_fst_sc_cmake.pl @@ -0,0 +1,31 @@ +#!/usr/bin/env perl +# DESCRIPTION: Verilator: Verilog Test driver/expect definition +# +# Copyright 2020 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 + +if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; } + +scenarios(vlt_all => 1); + +if (!$Self->have_sc) { + skip("No SystemC installed"); +} +else { + compile( + verilator_flags2 => ["--trace-fst --sc"], + verilator_make_gmake => 0, + verilator_make_cmake => 1, + ); + + execute( + check_finished => 1, + ); + + fst_identical($Self->trace_filename, $Self->{golden_filename}); +} +ok(1); +1; diff --git a/test_regress/t/t_trace_fst_sc_cmake.v b/test_regress/t/t_trace_fst_sc_cmake.v new file mode 100644 index 000000000..52c148bd5 --- /dev/null +++ b/test_regress/t/t_trace_fst_sc_cmake.v @@ -0,0 +1,98 @@ +// DESCRIPTION: Verilator: Verilog Test module +// +// This file ONLY is placed into the Public Domain, for any use, +// Author: Yu-Sheng Lin johnjohnlys@media.ee.ntu.edu.tw +// SPDX-License-Identifier: CC0-1.0 + +module t (/*AUTOARG*/ + // Inputs + clk + ); + + input clk; + + int cyc; + reg rstn; + + parameter real fst_gparam_real = 1.23; + localparam real fst_lparam_real = 4.56; + real fst_real = 1.23; + integer fst_integer; + bit fst_bit; + logic fst_logic; + int fst_int; + shortint fst_shortint; + longint fst_longint; + byte fst_byte; + + parameter fst_parameter = 123; + localparam fst_lparam = 456; + supply0 fst_supply0; + supply1 fst_supply1; + tri0 fst_tri0; + tri1 fst_tri1; + tri fst_tri; + wire fst_wire; + + logic [4:0] state; + + Test test (/*AUTOINST*/ + // Outputs + .state (state[4:0]), + // Inputs + .clk (clk), + .rstn (rstn)); + + // Test loop + always @ (posedge clk) begin + cyc <= cyc + 1; + if (cyc==0) begin + // Setup + rstn <= ~'1; + end + else if (cyc<10) begin + rstn <= ~'1; + end + else if (cyc<90) begin + rstn <= ~'0; + end + else if (cyc==99) begin + $write("*-* All Finished *-*\n"); + $finish; + end + end + +endmodule + + +module Test ( + input clk, + input rstn, + output logic [4:0] state + ); + + logic [4:0] state_w; + logic [4:0] state_array [3]; + assign state = state_array[0]; + + always_comb begin + state_w[4] = state_array[2][0]; + state_w[3] = state_array[2][4]; + state_w[2] = state_array[2][3] ^ state_array[2][0]; + state_w[1] = state_array[2][2]; + state_w[0] = state_array[2][1]; + end + + always_ff @(posedge clk or negedge rstn) begin + if (!rstn) begin + for (int i = 0; i < 3; i++) + state_array[i] <= 'b1; + end + else begin + for (int i = 0; i < 2; i++) + state_array[i] <= state_array[i+1]; + state_array[2] <= state_w; + end + end + +endmodule