rggen / rggen

Code generation tool for control and status registers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rc, w0c, w1c, wc, woc: bit field set when it should be cleared?

ifkato opened this issue · comments

Describe the bug

In the bit field implementation of rc, w0c, w1c, wc, and woc ("read/write something to clear bit"), it seems like "set" signal is connected rather than "clear".

To Reproduce

Steps to reproduce the behavior:

  1. specify "rc", "w0c", "w1c", "wc" or "woc" as bit field type.
  2. RTL file generated with "set" signal connected.

Expected behavior

RTL file generated with "clear" signal connected.

Screenshots

n/a

Additional context

related code:

Also, the document section about w1c may need to be fixed.

大変便利なソフトウェアを作ってくださり、ありがとうございます!

これらのビットフィールド型は、

  • アプリ論理側からの入力で 1 をセット
  • SW からの書き込みや読み出しで 0 クリア
    • 例えば w1c の場合、クリアしたいビットに 1 を書き込む

なので、セット信号が生成され繋がるのは仕様通りです。
(門川さん、鶴田さん、須山会の面々によろしくお伝えください。)

なるほどです!私の誤解だったようですね。
ありがとうございます!

質問や、機能追加の要望などありましたら、お気軽に issue を建ててくださいませ。