shtaxxx日記

コンピュータアーキテクチャについて研究している研究者の日記や技術紹介

2012-03-15から1日間の記事一覧

名前付きブロック (Named Block)の中ならalways文中でもreg宣言ができる

scope0とscope1のそれぞれでreg [7:0] aを宣言 module Test; reg [7:0] b; always @* begin: scope0 reg [7:0] a; a = b; begin: scope1 reg [7:0] a; a = b + 1; $display("scope1: a=%d", a); end $display("scope0: a=%d", a); end initial begin b = 10;…