LoginSignup
0
0

More than 1 year has passed since last update.

windowsでiverilog その102

Posted at

概要 

windowsでiverilogやってみた。
avrのcpu書いてみた。
定数比較cpiを実装する。

考え方

オペコードを一致させる。
レジスタコードを取り出し、定数と比較し、キャリアとゼロを求める。

サンプルコード

    parameter CMD_CPI  = 16'b0011xxxxxxxxxxxx;

            if (opcode[15:12] == CMD_CPI[15:12])
            begin
                Z <= ~| Ri;
                C <= Rs[7] & ~Rd[7] | Ri[7] & ~Rd[7] | Rs[7] & Ri[7];
            end

以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0