vista에서 quartus 그 23
개요
vista에서 quartus 해 보았다.
modelsim과 iverilog에서 움직이는 testbench 써 보았다.
사진
modelsim

iverilog

샘플 코드
l치카

module test2(input clk, input rst, output led5, led4, led2);
reg [26:0] cnt;
assign led5 = ~cnt[24];
assign led4 = ~cnt[25];
assign led2 = ~cnt[26];
always @(posedge clk, negedge rst)
begin
if (~rst)
cnt <= 'b0;
else
cnt <= cnt + 1;
end
endmodule
testbench
module test;
reg clk,
rst;
test2 t(.clk(clk), .rst(rst), .led5(led5), .led4(led4), .led2(led2));
initial
begin
clk = 0;
rst = 1;
#2
rst = 0;
#2
rst = 1;
#20000
$finish;
end
always
#1
clk = ~clk;
initial
begin
$dumpfile("test.vcd");
$dumpvars(0, test);
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 23), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/0d53f7d61d427c0b6a7f
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
modelsim

iverilog

샘플 코드
l치카

module test2(input clk, input rst, output led5, led4, led2);
reg [26:0] cnt;
assign led5 = ~cnt[24];
assign led4 = ~cnt[25];
assign led2 = ~cnt[26];
always @(posedge clk, negedge rst)
begin
if (~rst)
cnt <= 'b0;
else
cnt <= cnt + 1;
end
endmodule
testbench
module test;
reg clk,
rst;
test2 t(.clk(clk), .rst(rst), .led5(led5), .led4(led4), .led2(led2));
initial
begin
clk = 0;
rst = 1;
#2
rst = 0;
#2
rst = 1;
#20000
$finish;
end
always
#1
clk = ~clk;
initial
begin
$dumpfile("test.vcd");
$dumpvars(0, test);
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 23), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/0d53f7d61d427c0b6a7f
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
module test2(input clk, input rst, output led5, led4, led2);
reg [26:0] cnt;
assign led5 = ~cnt[24];
assign led4 = ~cnt[25];
assign led2 = ~cnt[26];
always @(posedge clk, negedge rst)
begin
if (~rst)
cnt <= 'b0;
else
cnt <= cnt + 1;
end
endmodule
module test;
reg clk,
rst;
test2 t(.clk(clk), .rst(rst), .led5(led5), .led4(led4), .led2(led2));
initial
begin
clk = 0;
rst = 1;
#2
rst = 0;
#2
rst = 1;
#20000
$finish;
end
always
#1
clk = ~clk;
initial
begin
$dumpfile("test.vcd");
$dumpvars(0, test);
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 23), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ohisama@github/items/0d53f7d61d427c0b6a7f텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)