2012-01-01から1年間の記事一覧

SystemVerilog パラメータ class

module と同じような感じで、classにもパラメータを渡すことができます。 C++で言うとテンプレートみたいな感じです。 サンプルコード class hoge #(int width = 1); logic [width-1:0] l_a; function void show(); $display("--- a = %3d", l_a); endfuncti…

SystemVerilog Class スコープ演算子

タイトルは適当につけていますが、規格上の説明は Class scope resolution operator :: のようになってます。 サンプルコード class hoge; static function void show(int a, int b); $display("- a = %3d, b = %3d", a, b); endfunction endclass module te…

SystemVerilog で多態性(polymorphism)のお勉強

SystemVerilogから class が追加されたので出来ます。 サンプルコード class base; virtual function void show(int a, int b); $display("--- base: a = %3d, b = %3d", a, b); endfunction endclass class hoge extends base; virtual function void show(…

SystemVerilog class の super

SystemVerilog classにて、super というものがあります。 サンプルコード class base; virtual function void show(int a, int b); $display("- a = %3d, b = %3d", a, b); endfunction endclass class hoge extends base; function void show(int a, int b=…

Markdown記法の環境構築

VimのMarkdown記法の環境を整えてみました。(Macの場合) Vim プラグイン neobundle.vim を入れていると以下のような感じです。 NeoBundle 'hallison/vim-markdown' NeoBundle 'thinca/vim-quickrun' NeoBundle 'tyru/open-browser.vim' quickrun_config設定…

はてブをMarkdown記法で書いてみる。

ブログをMarkdown記法で書こうと思うので色々テスト。 見出し(H2) 見出し (H3) 見出し(H4) 見出し(H5) 引用 改行には一つ必要なのね。 *リスト表示 * 追加 で記述 これでも 番号は自分で付けないといけないのか。 いち に リンクを確認 どうだ?Yahoo! J…