vista에서 quartus 4
개요
vista에서 quartus 해 보았다.
serial 두드려 보았다.
환경
windows vista 32bit
quartus ii v13.0
ep2c5t144 보드
사진

샘플 코드
module test1(input clk, input rst, output reg tx = 1);
reg [7:0] data;
reg [15:0] cnt_p;
reg [15:0] cnt_n;
reg out_p;
reg out_n;
reg [4:0] state;
parameter rate = 5208;
assign uart_clk = out_p ^ out_n;
initial
begin
cnt_p = 16'd1;
cnt_n = 16'd1;
out_p = 0;
out_n = 0;
state = 0;
tx = 1;
data = 8'h55;
end
always @(posedge clk)
begin
cnt_p <= cnt_n + 16'd1;
if (cnt_n == rate)
begin
cnt_p <= 16'd1;
out_p <= ~out_p;
end
end
always @(negedge clk)
begin
cnt_n <= cnt_p + 16'd1;
if (cnt_p == rate)
begin
cnt_n <= 16'd1;
out_n <= ~out_n;
end
end
always @(posedge uart_clk or negedge rst)
begin
if (!rst)
begin
state <= 0;
tx <= 1;
end
else
begin
if (state == 0)
begin
state <= 1;
end
else if (state != 0)
begin
state <= state + 1;
if (state == 2)
begin
tx <= 0;
end
else if (state > 2 && state <= 10)
begin
tx <= data[state - 3];
end
else if (state == 11)
begin
state <= 0;
tx <= 1;
end
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 4), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/04693a05283b517e526d
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
windows vista 32bit
quartus ii v13.0
ep2c5t144 보드
사진

샘플 코드
module test1(input clk, input rst, output reg tx = 1);
reg [7:0] data;
reg [15:0] cnt_p;
reg [15:0] cnt_n;
reg out_p;
reg out_n;
reg [4:0] state;
parameter rate = 5208;
assign uart_clk = out_p ^ out_n;
initial
begin
cnt_p = 16'd1;
cnt_n = 16'd1;
out_p = 0;
out_n = 0;
state = 0;
tx = 1;
data = 8'h55;
end
always @(posedge clk)
begin
cnt_p <= cnt_n + 16'd1;
if (cnt_n == rate)
begin
cnt_p <= 16'd1;
out_p <= ~out_p;
end
end
always @(negedge clk)
begin
cnt_n <= cnt_p + 16'd1;
if (cnt_p == rate)
begin
cnt_n <= 16'd1;
out_n <= ~out_n;
end
end
always @(posedge uart_clk or negedge rst)
begin
if (!rst)
begin
state <= 0;
tx <= 1;
end
else
begin
if (state == 0)
begin
state <= 1;
end
else if (state != 0)
begin
state <= state + 1;
if (state == 2)
begin
tx <= 0;
end
else if (state > 2 && state <= 10)
begin
tx <= data[state - 3];
end
else if (state == 11)
begin
state <= 0;
tx <= 1;
end
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 4), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/ohisama@github/items/04693a05283b517e526d
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
module test1(input clk, input rst, output reg tx = 1);
reg [7:0] data;
reg [15:0] cnt_p;
reg [15:0] cnt_n;
reg out_p;
reg out_n;
reg [4:0] state;
parameter rate = 5208;
assign uart_clk = out_p ^ out_n;
initial
begin
cnt_p = 16'd1;
cnt_n = 16'd1;
out_p = 0;
out_n = 0;
state = 0;
tx = 1;
data = 8'h55;
end
always @(posedge clk)
begin
cnt_p <= cnt_n + 16'd1;
if (cnt_n == rate)
begin
cnt_p <= 16'd1;
out_p <= ~out_p;
end
end
always @(negedge clk)
begin
cnt_n <= cnt_p + 16'd1;
if (cnt_p == rate)
begin
cnt_n <= 16'd1;
out_n <= ~out_n;
end
end
always @(posedge uart_clk or negedge rst)
begin
if (!rst)
begin
state <= 0;
tx <= 1;
end
else
begin
if (state == 0)
begin
state <= 1;
end
else if (state != 0)
begin
state <= state + 1;
if (state == 2)
begin
tx <= 0;
end
else if (state > 2 && state <= 10)
begin
tx <= data[state - 3];
end
else if (state == 11)
begin
state <= 0;
tx <= 1;
end
end
end
end
endmodule
이상.
Reference
이 문제에 관하여(vista에서 quartus 4), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/ohisama@github/items/04693a05283b517e526d텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)