vista에서 quartus 그 10
개요
vista에서 quartus 해 보았다.
serial에 send와 busy를 도입해 보았다.
환경
windows vista 32bit
quartus ii v13.0
ep2c5t144 보드
사진

샘플 코드
module test2(input clk, input rst, output tx);
localparam NEXT = 4'b0000;
localparam DONE = 4'b1111;
reg [5:0] n = 0;
reg [7:0] char;
reg [3:0] state = NEXT;
reg send = 0;
tx2 tx2(.clk(clk), .rst(rst), .send(send), .data(char), .tx(tx), .busy(busy));
always @(posedge clk or negedge rst)
begin
if (rst == 0)
begin
state <= NEXT;
n <= 0;
end
else if (send == 1)
begin
send <= 0;
end
else if (state == NEXT)
begin
state <= 1;
end
else if (busy == 0 && state != DONE)
begin
if (n == 26)
begin
state <= DONE;
end
else
begin
char <= 97 + n;
send <= 1;
n <= n + 1;
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 10), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/4c3e507d5a8c54a05c38
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
windows vista 32bit
quartus ii v13.0
ep2c5t144 보드
사진

샘플 코드
module test2(input clk, input rst, output tx);
localparam NEXT = 4'b0000;
localparam DONE = 4'b1111;
reg [5:0] n = 0;
reg [7:0] char;
reg [3:0] state = NEXT;
reg send = 0;
tx2 tx2(.clk(clk), .rst(rst), .send(send), .data(char), .tx(tx), .busy(busy));
always @(posedge clk or negedge rst)
begin
if (rst == 0)
begin
state <= NEXT;
n <= 0;
end
else if (send == 1)
begin
send <= 0;
end
else if (state == NEXT)
begin
state <= 1;
end
else if (busy == 0 && state != DONE)
begin
if (n == 26)
begin
state <= DONE;
end
else
begin
char <= 97 + n;
send <= 1;
n <= n + 1;
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 10), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/4c3e507d5a8c54a05c38
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
module test2(input clk, input rst, output tx);
localparam NEXT = 4'b0000;
localparam DONE = 4'b1111;
reg [5:0] n = 0;
reg [7:0] char;
reg [3:0] state = NEXT;
reg send = 0;
tx2 tx2(.clk(clk), .rst(rst), .send(send), .data(char), .tx(tx), .busy(busy));
always @(posedge clk or negedge rst)
begin
if (rst == 0)
begin
state <= NEXT;
n <= 0;
end
else if (send == 1)
begin
send <= 0;
end
else if (state == NEXT)
begin
state <= 1;
end
else if (busy == 0 && state != DONE)
begin
if (n == 26)
begin
state <= DONE;
end
else
begin
char <= 97 + n;
send <= 1;
n <= n + 1;
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 그 10), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ohisama@github/items/4c3e507d5a8c54a05c38텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)