VOOZH about

URL: https://qiita.com/ohisama@github/items/68951ce4d6ba7697f5d6

⇱ 高位合成言語アセンブラを作る。 その4 #FPGA - Qiita


👁 Image
1

Go to list of users who liked

0

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 1 year has passed since last update.

@ohisama@github

高位合成言語アセンブラを作る。 その4

1
Last updated at Posted at 2020-10-30

概要

高位合成言語アセンブラを作る。
ソースから、verilogを生成するコンパイラを作る。

生成したverilog

module x(input a, input b, output c, output d);
 assign c = a ^ b;
 assign d = a | b;
endmodule

module testbench;
 reg a, b;
 x u(.a(a), .b(b), .c(c), .d(d));
 initial
 begin
 $display("a b c d ");
 $monitor("%b %b %b %b ", a, b, c, d);
 a = 0; b = 0; #10;
 a = 0; b = 1; #10;
 a = 1; b = 0; #10;
 a = 1; b = 1; #10;
 $finish;
 end
endmodule

成果物

以上。

1

Go to list of users who liked

0
0

Go to list of comments

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
1

Go to list of users who liked

0