This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module あ | |
| sub main | |
| dim A=123+456*78/90-&HEAD | |
| coNSOLe.wRiTELine(A) | |
| end sub | |
| end module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| initial begin | |
| $assertoff; | |
| wait(ev.triggered); | |
| $asserton; | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $asserton(0, top); // (levels [, list_of_modules_or_assertions]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module m #(max_size = 1023) ( | |
| input clk, | |
| input rst_n, | |
| input [$clog2(max_count):0] in, | |
| output [$clog2(max_count):0] out | |
| ); | |
| endmodule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| genvar i; | |
| for (i = 0; i < SIZE; i = i + 1) begin | |
| // module m を SIZE 個インスタンス | |
| m i_m(.clk(clk), .rst_n(rst_n), .x(x[i]), .y(y)); | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| generate | |
| genvar i; | |
| for (i = 0; i < SIZE; i = i + 1) begin | |
| m i_m(.clk(clk), .rst_n(rst_n), .x(x[i]), .y(y)); | |
| end | |
| endgenerate | |
| generate | |
| for (i = 0; i < SIZE; i = i + 1) begin // 上記宣言の genvar i が有効 | |
| m i_m(.clk(clk), .rst_n(rst_n), .x(x[i]), .y(y)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // foo[0].i_m ~ foo[SIZE-1].i_m がインスタンスされる | |
| for (i = 0; i < SIZE; i = i + 1) begin : foo | |
| m i_m(.clk(clk), .rst_n(rst_n), .x(x[i]), .y(y)); | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (genvar i = 0; i < SIZE; i++) begin | |
| m i_m(.clk(clk), .rst_n(rst_n), .x(x[i]), .y(y)); | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 5 // 32-bit | |
| 'd5 // 32-bit | |
| 'h5 // 32-bit | |
| 'b101 // 32-bit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| logic [63:0] a; | |
| a = '0; // | |
| a = '1; // a = 64'hFFFF_FFFF_FFFF_FFFF | |
| a = 'x; // 'X も OK | |
| a = 'z; // 'Z も OK |