당일치기 빡심...
왕복하면 한 470km 나오는데 빡세다..
가기 싫다 ㅠㅠ
'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글
이른(?) 여름휴가 (0) | 2018.06.23 |
---|---|
오랫만에 똥차 세대를 보네 (0) | 2018.06.22 |
피곤함.. (0) | 2018.05.31 |
kb 파인테크 신용카드.. (2) | 2018.05.11 |
멘탈 와사삭 (2) | 2018.05.03 |
당일치기 빡심...
왕복하면 한 470km 나오는데 빡세다..
가기 싫다 ㅠㅠ
이른(?) 여름휴가 (0) | 2018.06.23 |
---|---|
오랫만에 똥차 세대를 보네 (0) | 2018.06.22 |
피곤함.. (0) | 2018.05.31 |
kb 파인테크 신용카드.. (2) | 2018.05.11 |
멘탈 와사삭 (2) | 2018.05.03 |
빨간날이라 쉬니 좋은건가..
아무튼 이래저래 하얗게 불태우고 체력 완전 방전
피곤피곤... (0) | 2018.06.16 |
---|---|
체력 방전 (0) | 2018.06.09 |
피곤피곤.. (0) | 2018.06.02 |
월차, 아내님 병원 그리고 드론 (8) | 2018.05.28 |
주말이 머했는데 끝나냐... (0) | 2018.05.27 |
자주 보는(?) 컬러바차트는 아래와 같은데
ITU-R BT.471-1을 따르는 데
RGB의 출력 패턴을 아래와 같이 (a) 100/0/100/0 의 내용대로 하면 나오는 듯?
[링크 : https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.471-1-198607-I!!PDF-E.pdf]
setup, hold, slack? (0) | 2018.06.28 |
---|---|
vga 출력 Hsync, Vsync 파형 (0) | 2018.06.08 |
자이로 드리프트 (0) | 2018.05.15 |
balanced unbalanced (0) | 2018.05.14 |
MFCCs - Mel-frequency cepstral coefficients (0) | 2018.05.02 |
득도할 수 없으면.. 즐겨야 하나!?
어제 1500 대 까지 회복했으니.. 열심히 달리면.... (응?)
|
읭? 티스토리 글 쓰기 개편인가? (4) | 2018.07.10 |
---|---|
부랴부랴 도메인 연장 (4) | 2018.06.11 |
블로그 방문자도 훅 줄어드네 (0) | 2018.06.03 |
블로그 주기적으로 공개 안했더니... (2) | 2018.05.30 |
잠시나마 행복했군? (2) | 2018.05.04 |
DE0-nano에 LemonLite RGB 보드 사용
모니터 마다 해상도 출력이 좀 다른데 머가 문제일까..
일단 눈을 띄우는데는 성공했으니 뭐가 문제인지는 좀 찾아 봐야 할 듯..
vga640x480 vga( CLOCK_50, KEY[0], LED, GP0[6], GP0[5], {GP0[16],GP0[19],GP0[18],GP0[21]}, {GP0[12],GP0[15],GP0[14],GP0[17]}, {GP0[8],GP0[9],GP0[10],GP0[13]} ); |
module vga640x480( input clk, input rst, output [7:0] LED, output reg hsync, output reg vsync, output [3:0] r, output [3:0] g, output [3:0] b ); reg clk25; reg [9:0] horizontal_counter; reg [9:0] vertical_counter; reg [9:0] X; reg [9:0] Y; wire [7:0] red; wire [7:0] green; wire [7:0] blue; assign r[3:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? red : 4'b000;
assign g[3:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? green : 4'b000;
assign b[3:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? blue : 4'b000;
assign red = ((horizontal_counter >= 144)&&(horizontal_counter < 344) ) ? 4'b1111 : 4'b0000; assign green = ((horizontal_counter >= 344)&&(horizontal_counter < 544) ) ? 4'b1111 : 4'b0000; assign blue = ((horizontal_counter >= 544)&&(horizontal_counter < 784) ) ? 4'b1111 : 4'b0000; always @(posedge clk) begin if (clk25 == 0) begin clk25 <= 1; end else begin clk25 <= 0; end end always @(posedge clk25) begin
if ((horizontal_counter > 0) && (horizontal_counter < 97))// -- 96+1 begin hsync <= 0; end else begin hsync <= 1; end
if ((vertical_counter > 0 ) && (vertical_counter < 3 )) //-- 2+1 begin vsync <= 0; end else begin vsync <= 1; end
horizontal_counter <= horizontal_counter+1;
if (horizontal_counter == 800) begin vertical_counter <= vertical_counter+1; horizontal_counter <= 0; end
if (vertical_counter == 521) begin vertical_counter <= 0; end
end endmodule |
[링크 : https://github.com/pmezydlo/DE0-Nano-SOC-VGA/blob/master/vgaram.v]
de0-nano에 vga 내 코드... ㅠㅠ (0) | 2018.06.27 |
---|---|
어라.. 스펙을 잘못봤나? (0) | 2018.06.15 |
vga 640x480 실패중 그리고 800x600x60 (0) | 2018.06.05 |
800x600 72hz vga 출력 예제 (0) | 2018.06.05 |
vga 출력 해보기.. 시도중 (2) | 2018.06.03 |
소스 코드 수정중인데 안나오네
vga640x480 vga( CLOCK_50, KEY[0], LED, GP0[6], GP0[5], {GP0[16],GP0[19],GP0[18],GP0[21]}, {GP0[12],GP0[15],GP0[14],GP0[17]}, {GP0[8],GP0[9],GP0[10],GP0[13]} ); |
module vga640x480( input clk, input rst, output [7:0] LED, output hsync, output vsync, output [3:0] r, output [3:0] g, output [3:0] b ); parameter HSYNC = 189; parameter HBP = (HSYNC + 95); parameter HVID = (HBP + 1260); parameter HFP = (HVID + 47); parameter VSYNC = 3000; parameter VBP = (VSYNC + 51000); parameter VVID = (VBP + 762500); parameter VFP = (VVID + 17500); reg [19:0] cnt; always @ (posedge clk or negedge rst) begin if (!rst) begin cnt <= 0; end else begin cnt <= cnt + 1; if(cnt > 834000) cnt <= 0; end end assign hsync = ((cnt % 1590) < 189) ? 0 : 1; assign vsync = (cnt < 3000) ? 0 : 1; assign r = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign g = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign b = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign LED[0] = ~vsync; assign LED[1] = ~hsync; endmodule |
V sync는 59.95
H sync는 31.31kHz 이고
sync 길이도 파형도 맞는거 같은데..
Vsync 60us 근처
Hsync 4us 근처
왜 안될까...
+
module vga800x600x60( input clk, input rst, output [7:0] LED, output hsync, output vsync, output [3:0] r, output [3:0] g, output [3:0] b ); parameter HSYNC = 160; parameter HBP = (HSYNC + 95); parameter HVID = (HBP + 1260); parameter HFP = (HVID + 47); parameter VSYNC = 5300; parameter VBP = (VSYNC + 51000); parameter VVID = (VBP + 762500); parameter VFP = (VVID + 17500); reg [19:0] cnt; always @ (posedge clk or negedge rst) begin if (!rst) begin cnt <= 0; end else begin cnt <= cnt + 1; if(cnt > 828950) cnt <= 0; end end assign hsync = ((cnt % 1320) < 160) ? 0 : 1; assign vsync = (cnt < 5300) ? 0 : 1; assign r = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign g = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign b = ((hsync & vsync) == 1 ? 4'b1111 : 4'b0000); assign LED[0] = ~vsync; assign LED[1] = ~hsync; endmodule |
For VESA 800*600 @ 60Hz: Fh (kHz) :37.88 A (us) :26.4 B (us) :3.2 C (us) :2.2 D (us) :20.0 E (us) :1.0 Fv (Hz) :60.32 O (ms) :16.579 P (ms) :0.106 Q (ms) :0.607 R (ms) :15.84 S (ms) :0.026 |
[링크 : http://www.epanorama.net/documents/pc/vga_timing.html]
+
640x480x60 에 빨간화면 확인
vga640x480 vga( CLOCK_50, KEY[0], LED, GP0[6], GP0[5], {GP0[16],GP0[19],GP0[18],GP0[21]}, {GP0[12],GP0[15],GP0[14],GP0[17]}, {GP0[8],GP0[9],GP0[10],GP0[13]} ); |
모니터에 따라 인식이 느리거나 안되기도 하네..
848x640x60 으로 인식... 머야(요즘 24인치 FHD LCD 모니터)
module vga640x480( input clk, input rst, output [7:0] LED, output reg hsync, output reg vsync, output [3:0] r, output [3:0] g, output [3:0] b ); reg clk25; reg [9:0] horizontal_counter; reg [9:0] vertical_counter; reg [9:0] X; reg [9:0] Y; wire [7:0] red; wire [7:0] green; wire [7:0] blue; assign r[3:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? 4'b1111 : 4'b000;
assign g[1:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? 4'b1111 : 4'b000;
assign b[2:0] = ((horizontal_counter >= 144) && (horizontal_counter < 784) && (vertical_counter >=39) && (vertical_counter < 519)) ? 4'b1111 : 4'b000;
assign red = ((horizontal_counter >= 144)&&(horizontal_counter < 344) ) ? 4'b1111 : 4'b0000; assign green = ((horizontal_counter >= 344)&&(horizontal_counter < 544) ) ? 4'b1111 : 4'b0000; assign blue = ((horizontal_counter >= 544)&&(horizontal_counter < 784) ) ? 4'b1111 : 4'b0000; always @(posedge clk) begin if (clk25 == 0) begin clk25 <= 1; end else begin clk25 <= 0; end end always @(posedge clk25) begin
if ((horizontal_counter > 0) && (horizontal_counter < 97))// -- 96+1 begin hsync <= 0; end else begin hsync <= 1; end
if ((vertical_counter > 0 ) && (vertical_counter < 3 )) //-- 2+1 begin vsync <= 0; end else begin vsync <= 1; end
horizontal_counter <= horizontal_counter+1;
if (horizontal_counter == 800) begin vertical_counter <= vertical_counter+1; horizontal_counter <= 0; end
if (vertical_counter == 521) begin vertical_counter <= 0; end
end endmodule |
[링크 : https://github.com/pmezydlo/DE0-Nano-SOC-VGA/blob/master/vgaram.v]
어라.. 스펙을 잘못봤나? (0) | 2018.06.15 |
---|---|
먼가 이상하지만 640x480x60 되는 소스 발견 (0) | 2018.06.05 |
800x600 72hz vga 출력 예제 (0) | 2018.06.05 |
vga 출력 해보기.. 시도중 (2) | 2018.06.03 |
lemonlite vga 어댑터 + de0-nano (0) | 2018.05.30 |
[링크 : https://www.youtube.com/watch?v=FriAr5dcGto]
+
VGA 이미지가 여기서 나온거였네..
[링크 : https://sites.google.com/site/ece31289upb/practicas-de-clase/practica-4-sincronizadores/video-sync]
intel FPGA를 이용한 Processor Logic 설계입문 관련 링크 (0) | 2018.06.15 |
---|---|
quartus 2 qar file (0) | 2018.06.11 |
de0-nano 그리고 modelsim 사용법 (0) | 2018.06.04 |
object "r" on left-hand side of assignment must have a variable data type (4) | 2018.06.03 |
cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct (0) | 2018.06.02 |
reset키(key[0])를 누르고있는 동안에는 영상이 나온다.
단순하게 posedge를 negedge로 바꾸려고 하는데 에러나네.. ㅠㅠ
빨강이 옆에 번지는건 왜일까..
800x600 72Hz 라고 출력된다.
vga_demo vga( CLOCK_50, KEY[0], GP0[16], GP0[12], GP0[8], GP0[6], GP0[5], ); |
/* VGA Demo 800x600 at 72Hz http://www-mtl.mit.edu/Courses/6.111/labkit/vga.shtml 800x600, 72Hz 50.000 800 56 120 64 600 37 6 23 Pixel Clock (MHz): 50.000 Horizontal (in Pixels) Active Video: 800 (16us) Front Porch: 56 (1.12us) Sync Pulse: 120 (2.4us) Back Porch: 64 (1.28us) Total pixel clock ticks: 1040 (20.8us) Vertical (in Lines, so x20.8us) Active Video: 600 (12480us) Front Porch: 37 (769.6us) Sync Pulse: 6 (124.8us) Back Porch: 23 (478.4us) Total pixel clock ticks: 666 (13.32us) Total pixel clock ticks: 692,640 50,000,000 / 692,640 = 72.187572188 = 72Hz 1 pixel clock = 1/50Mhz = 20ns = 0.02us */ module vga_demo ( CLOCK_50, RESET, VGA_RED, VGA_GREEN, VGA_BLUE, VGA_HS, VGA_VS ); input CLOCK_50; input RESET; output VGA_RED; output VGA_GREEN; output VGA_BLUE; output VGA_HS; output VGA_VS; /* Internal registers for horizontal signal timing */ reg [10:0] hor_reg; // to count 1040 different values up to 1039 reg hor_sync; wire hor_max = (hor_reg == 1039); // to tell when a line is full /* Internal registers for vertical signal timing */ reg [9:0] ver_reg; // to count 666 different values up to 665 reg ver_sync; reg red, green, blue; wire ver_max = (ver_reg == 665); // to tell when a line is full // Code
/* Running through line */ always @ (posedge CLOCK_50 or posedge RESET) begin if (RESET) begin hor_reg <= 0; ver_reg <= 0; end else if (hor_max) begin hor_reg <= 0; /* Running through frame */ if (ver_max) ver_reg <= 0; else ver_reg <= ver_reg + 1; end else hor_reg <= hor_reg + 1; end
always @ (posedge CLOCK_50 or posedge RESET) begin
if (RESET) begin hor_sync <= 0; ver_sync <= 0; end else begin /* Generating the horizontal sync signal */ if (hor_reg == 856) // video (800) + front porch (56) hor_sync <= 1; // turn on horizontal sync pulse else if (hor_reg == 976) // video (800) + front porch (56) + Sync Pulse (120) hor_sync <= 0; // turn off horizontal sync pulse /* Generating the vertical sync signal */ if (ver_reg == 637) // LINES: video (600) + front porch (37) ver_sync <= 1; // turn on vertical sync pulse else if (ver_reg == 643) // LINES: video (600) + front porch (37) + Sync Pulse (6) ver_sync <= 0; // turn off vertical sync pulse
// Draw a single square. if (hor_reg >= 100 && hor_reg <= 200 && ver_reg >= 100 && ver_reg <= 200) begin red <= 1; green <= 0; blue <= 0; end else begin red <= 1; green <= 1; blue <= 1; end
end end // Send the sync signals to the output, inverted as the sync pulse is low. // Maybe wrong as this doc says pulse id positive http://tinyvga.com/vga-timing/800x600@72Hz assign VGA_HS = ~hor_sync; assign VGA_VS = ~ver_sync;
// Send a pattern of colours (based on the registry bits) but do not output anything during the synchronization periods //assign VGA_RED = (!hor_reg[0] && !ver_reg[0] && ver_reg < 600 && hor_reg < 800); //assign VGA_GREEN = (!hor_reg[1] && !ver_reg[1] && ver_reg < 600 && hor_reg < 800); //assign VGA_BLUE = (!hor_reg[2] && !ver_reg[2] && ver_reg < 600 && hor_reg < 800);
assign VGA_RED = red && ver_reg < 600 && hor_reg < 800; assign VGA_GREEN = green && ver_reg < 600 && hor_reg < 800; assign VGA_BLUE = blue && ver_reg < 600 && hor_reg < 800;
// http://gerfficient.com/2013/02/11/fpga-to-vga-using-de0-nano/
endmodule |
[링크 : https://github.com/theapi/de0-nano/blob/master/vga/experiment/vga_demo.v]
어라.. 스펙을 잘못봤나? (0) | 2018.06.15 |
---|---|
먼가 이상하지만 640x480x60 되는 소스 발견 (0) | 2018.06.05 |
vga 640x480 실패중 그리고 800x600x60 (0) | 2018.06.05 |
vga 출력 해보기.. 시도중 (2) | 2018.06.03 |
lemonlite vga 어댑터 + de0-nano (0) | 2018.05.30 |
일단 하나 검색했으니 집에가서 따라해봐야지
RTL Level Simulation with ModelSim
- Synthesis 이후에 시뮬레이션 가능
Gate Level Simulation
- 전체 컴파일 이후에 시뮬레이션 가능
[링크 : http://idlelogiclabs.com/2011/12/04/using-modelsim-with-quartus-ii-and-the-de0-nano/]
게이트-레벨시뮬레이션은타이밍시뮬레이션에서 기능적결과의차이만을확인한다. 만약게이트-레벨시뮬레 이션은문제없고타이밍시뮬레이션이실패했다면, 넷리스트 가아닌타이밍으로발생된부분임을나타낸다. 백-어노테이트 타이밍 시뮬레이션은 타이밍 정보가 있는 게이트-레벨 시뮬레이션이다. 이를 위해 FPGA 벤더는 VITAL (VHDL Gate Level) 넷리스트 또는 Verilog 넷리스 트를 생성한다 |
[링크 : http://www.itfind.or.kr/COMIN/file24639-FPGA%20디버깅%20방법.pdf]
quartus 2 qar file (0) | 2018.06.11 |
---|---|
HDMI de0-nano (0) | 2018.06.05 |
object "r" on left-hand side of assignment must have a variable data type (4) | 2018.06.03 |
cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct (0) | 2018.06.02 |
PWM 발생기 1개 연결하기 (0) | 2018.05.30 |
output 대신에
output reg를 쓰니 해결..
c언어 때 처럼 무슨 문제인지 감이 영안오네...
[링크 : https://electronics.stackexchange.com/...left-hand-side-of-assignment-must-have-a-variable-data-type]
HDMI de0-nano (0) | 2018.06.05 |
---|---|
de0-nano 그리고 modelsim 사용법 (0) | 2018.06.04 |
cannot match operand(s) in the condition to the corresponding edges in the enclosing event control of the always construct (0) | 2018.06.02 |
PWM 발생기 1개 연결하기 (0) | 2018.05.30 |
signal Tap 2와 talkback? (0) | 2018.05.30 |