mirror of
https://github.com/lowobservable/coax.git
synced 2026-02-27 09:28:56 +00:00
Hello world
This commit is contained in:
@@ -3,9 +3,10 @@ VVP ?= vvp
|
||||
|
||||
RTL = ../rtl
|
||||
|
||||
all: coax_tx_tb.vcd
|
||||
all: coax_tx_tb.vcd hello_world_tb.vcd
|
||||
|
||||
coax_tx_tb: coax_tx_tb.v $(RTL)/coax_tx.v
|
||||
hello_world_tb: hello_world_tb.v $(RTL)/hello_world.v $(RTL)/coax_tx.v
|
||||
|
||||
clean:
|
||||
rm -f *_tb *.vcd
|
||||
|
||||
32
interface2/tests/hello_world_tb.v
Normal file
32
interface2/tests/hello_world_tb.v
Normal file
@@ -0,0 +1,32 @@
|
||||
`default_nettype none
|
||||
|
||||
module hello_world_tb();
|
||||
reg clk = 0;
|
||||
|
||||
initial
|
||||
begin
|
||||
forever
|
||||
begin
|
||||
#1 clk <= ~clk;
|
||||
end
|
||||
end
|
||||
|
||||
wire tx;
|
||||
wire tx_active;
|
||||
|
||||
hello_world dut (
|
||||
.clk(clk),
|
||||
.tx(tx),
|
||||
.tx_active(tx_active)
|
||||
);
|
||||
|
||||
initial
|
||||
begin
|
||||
$dumpfile("hello_world_tb.vcd");
|
||||
$dumpvars(0, hello_world_tb);
|
||||
|
||||
repeat(2000) @(posedge clk);
|
||||
|
||||
$finish;
|
||||
end
|
||||
endmodule
|
||||
Reference in New Issue
Block a user