T
Tom2
Guest
누가 날이 Verilog VHDL 코드를 번역하는 데 도움이 누구인가요? 코드 :모듈 vga_controller (SynchClock, A와 B는 C, D 조, inGreen, inBlue inRed 빨강, 초록, 파랑, Hsynch, Vsynch, 빈, 동기화, mem_address);
입력 SynchClock;
입력 A와 B는 C, D 조;
입력 [7시], inBlue inGreen inRed;
출력 [7시] 빨강, 녹색, 파랑;
출력 Hsynch, Vsynch;
출력 빈, 동기화;
출력 reg [16시] mem_address;
[7시] reg 레드 = 8'b00000000, 녹색 = 8'b00000000, 블루 = 8'b00000000;
reg Vsynch = 0, Hsynch = 0;
= 1 동기화 빈 = 1 reg;
reg [19시] × 2 = 20'b00000000000000000000, y2는 = 20'b00000000000000000000;
[9시] reg Hcount = 10'b0000000000, Vcount = 10'b0000000000;
[9시] reg PixelRow = 10'b0000000000, PixelCol = 10'b0000000000;
항상 (negedge SynchClock) @ 시작
빈 = 1'b1;
동기화 = 1'b1;
만약 (Hcount == 799) Hcount = 0;
다른 Hcount = Hcount 1;
만약 (Hcount "= 661 & & Hcount"= 756) Hsynch = 0;
다른 Hsynch = 1;
만약 (Vcount "= 525 & & Hcount"= 756) Vcount = 0;
다른 경우 (Hcount == 756) Vcount = Vcount 1;
만약 (Vcount "= 491 & & Vcount"= 493) Vsynch = 0;
다른 Vsynch = 1;
만약 (Hcount "= 640) PixelCol = Hcount;
만약 (Vcount "= 480) PixelRow = Vcount;
만약 (Hcount "= 640 & & Vcount"= 480)을 시작
만약 (식사와 침대 & C & D 회사)를 시작
만약 (PixelCol "= 479 & & PixelCol"= 159 & & PixelRow "= 359 & & PixelRow"= 119)을 시작
mem_address = ((PixelRow - 119) * 320) PixelCol - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (식사와 침대 & C는 & ~ D)를 시작합니다
/ / 만약 (PixelCol "= 479 & & PixelCol"= 159 & & PixelRow "= 359 & & PixelRow"= 119)을 시작
× 2 = 724 * 724 * PixelCol/1024 PixelRow/1024;
y2는 =- 724 * 724 * PixelCol/1024 PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
/ * 종료
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
* /
만약 (식사와 침대 & ~ C & D 회사)를 시작
만약 (PixelCol "= 159 & & PixelRow"= 439 & & PixelRow "= 119)을 시작
× 2 = PixelRow;
y2는 =- PixelCol;
mem_address = ((y2는 159) * 320) × 2 - 119;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (식사와 침대 & ~ C & ~ D)를 시작합니다
X2는 =- 724 * 724 * PixelCol/1024 PixelRow/1024;
y2는 =- 724 * PixelCol/1024 - 724 * PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
만약 (& ~ 아침 식사 C & D 회사)를 시작
만약 (PixelCol "= 159 & & PixelRow"= 119)을 시작
X2는 =- PixelCol;
y2는 =- PixelRow;
mem_address = ((y2는 119) * 320) X2는 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (& ~ b & C는 & ~ D)를 시작합니다
X2는 =- 724 * PixelCol/1024 - 724 * PixelRow/1024;
y2가 = 724 * PixelCol/1024 - 724 * PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
만약 (& ~ 아침 식사 ~ C & D 회사)를 시작
만약 (PixelCol "= 399 & & PixelCol"= 159 & & PixelRow "= 119)을 시작
× 2 = - PixelRow;
y2는 = PixelCol;
mem_address = ((y2가 - 159) * 320) X2는 119;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (& ~ 아침 식사 ~ C & ~ D)를 시작합니다
× 2 = 724 * PixelCol/1024 - 724 * PixelRow/1024;
y2가 = 724 * 724 * PixelCol/1024 PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
/ * 만약 (~ 식사와 침대 & C & D 회사)를 시작
만약 (~ 식사와 침대 & C는 & ~ D)를 시작합니다
만약 (~ 식사와 침대 & ~ C & D 회사)를 시작
만약 (~ 식사와 침대 & ~ C & ~ D)를 시작합니다
만약 (~ & ~ 아침 식사 C & D 회사)를 시작
만약 (~ & ~ b & C는 & ~ D)를 시작합니다
만약 (~ & ~ 아침 식사 ~ C & D 회사)를 시작
만약 (~ & ~ 아침 식사 ~ C & ~ D)를 시작합니다
만약 (식사와 침대 & C는 & ~ D)를 시작합니다
만약 (PixelCol "320 & & PixelRow"240) / 시작 / katw aristera xwris 그린
mem_address = ((PixelRow - 240) * 320) PixelCol;
홍 = inRed;
그린 = 8'b00000000;
블루 = inBlue;
끝
만약 (PixelCol "= 320 & & PixelRow"= 240) / 시작 / panw deksia xwris 블루
mem_address = (PixelRow * 320) PixelCol - 320;
홍 = inRed;
그린 = inGreen;
블루 = 8'b00000000;
끝
만약 (PixelCol "= 320 & & PixelRow"240) / 시작 / katw deksia xwris 레드
mem_address = ((PixelRow - 240) * 320) PixelCol - 320;
홍 = 8'b00000000;
그린 = inGreen;
블루 = inBlue;
끝
* / 끝
다른 시작
홍 = 8'b00000000;
그린 = 8'b00000000;
블루 = 8'b00000000;
끝
끝
endmodule
입력 SynchClock;
입력 A와 B는 C, D 조;
입력 [7시], inBlue inGreen inRed;
출력 [7시] 빨강, 녹색, 파랑;
출력 Hsynch, Vsynch;
출력 빈, 동기화;
출력 reg [16시] mem_address;
[7시] reg 레드 = 8'b00000000, 녹색 = 8'b00000000, 블루 = 8'b00000000;
reg Vsynch = 0, Hsynch = 0;
= 1 동기화 빈 = 1 reg;
reg [19시] × 2 = 20'b00000000000000000000, y2는 = 20'b00000000000000000000;
[9시] reg Hcount = 10'b0000000000, Vcount = 10'b0000000000;
[9시] reg PixelRow = 10'b0000000000, PixelCol = 10'b0000000000;
항상 (negedge SynchClock) @ 시작
빈 = 1'b1;
동기화 = 1'b1;
만약 (Hcount == 799) Hcount = 0;
다른 Hcount = Hcount 1;
만약 (Hcount "= 661 & & Hcount"= 756) Hsynch = 0;
다른 Hsynch = 1;
만약 (Vcount "= 525 & & Hcount"= 756) Vcount = 0;
다른 경우 (Hcount == 756) Vcount = Vcount 1;
만약 (Vcount "= 491 & & Vcount"= 493) Vsynch = 0;
다른 Vsynch = 1;
만약 (Hcount "= 640) PixelCol = Hcount;
만약 (Vcount "= 480) PixelRow = Vcount;
만약 (Hcount "= 640 & & Vcount"= 480)을 시작
만약 (식사와 침대 & C & D 회사)를 시작
만약 (PixelCol "= 479 & & PixelCol"= 159 & & PixelRow "= 359 & & PixelRow"= 119)을 시작
mem_address = ((PixelRow - 119) * 320) PixelCol - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (식사와 침대 & C는 & ~ D)를 시작합니다
/ / 만약 (PixelCol "= 479 & & PixelCol"= 159 & & PixelRow "= 359 & & PixelRow"= 119)을 시작
× 2 = 724 * 724 * PixelCol/1024 PixelRow/1024;
y2는 =- 724 * 724 * PixelCol/1024 PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
/ * 종료
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
* /
만약 (식사와 침대 & ~ C & D 회사)를 시작
만약 (PixelCol "= 159 & & PixelRow"= 439 & & PixelRow "= 119)을 시작
× 2 = PixelRow;
y2는 =- PixelCol;
mem_address = ((y2는 159) * 320) × 2 - 119;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (식사와 침대 & ~ C & ~ D)를 시작합니다
X2는 =- 724 * 724 * PixelCol/1024 PixelRow/1024;
y2는 =- 724 * PixelCol/1024 - 724 * PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
만약 (& ~ 아침 식사 C & D 회사)를 시작
만약 (PixelCol "= 159 & & PixelRow"= 119)을 시작
X2는 =- PixelCol;
y2는 =- PixelRow;
mem_address = ((y2는 119) * 320) X2는 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (& ~ b & C는 & ~ D)를 시작합니다
X2는 =- 724 * PixelCol/1024 - 724 * PixelRow/1024;
y2가 = 724 * PixelCol/1024 - 724 * PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
만약 (& ~ 아침 식사 ~ C & D 회사)를 시작
만약 (PixelCol "= 399 & & PixelCol"= 159 & & PixelRow "= 119)을 시작
× 2 = - PixelRow;
y2는 = PixelCol;
mem_address = ((y2가 - 159) * 320) X2는 119;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
다른 시작
홍 = 8'b11111111;
그린 = 8'b11111111;
블루 = 8'b11111111;
끝
끝
만약 (& ~ 아침 식사 ~ C & ~ D)를 시작합니다
× 2 = 724 * PixelCol/1024 - 724 * PixelRow/1024;
y2가 = 724 * 724 * PixelCol/1024 PixelRow/1024;
mem_address = ((y2가 - 119) * 320) × 2 - 159;
홍 = inRed;
그린 = inGreen;
블루 = inBlue;
끝
/ * 만약 (~ 식사와 침대 & C & D 회사)를 시작
만약 (~ 식사와 침대 & C는 & ~ D)를 시작합니다
만약 (~ 식사와 침대 & ~ C & D 회사)를 시작
만약 (~ 식사와 침대 & ~ C & ~ D)를 시작합니다
만약 (~ & ~ 아침 식사 C & D 회사)를 시작
만약 (~ & ~ b & C는 & ~ D)를 시작합니다
만약 (~ & ~ 아침 식사 ~ C & D 회사)를 시작
만약 (~ & ~ 아침 식사 ~ C & ~ D)를 시작합니다
만약 (식사와 침대 & C는 & ~ D)를 시작합니다
만약 (PixelCol "320 & & PixelRow"240) / 시작 / katw aristera xwris 그린
mem_address = ((PixelRow - 240) * 320) PixelCol;
홍 = inRed;
그린 = 8'b00000000;
블루 = inBlue;
끝
만약 (PixelCol "= 320 & & PixelRow"= 240) / 시작 / panw deksia xwris 블루
mem_address = (PixelRow * 320) PixelCol - 320;
홍 = inRed;
그린 = inGreen;
블루 = 8'b00000000;
끝
만약 (PixelCol "= 320 & & PixelRow"240) / 시작 / katw deksia xwris 레드
mem_address = ((PixelRow - 240) * 320) PixelCol - 320;
홍 = 8'b00000000;
그린 = inGreen;
블루 = inBlue;
끝
* / 끝
다른 시작
홍 = 8'b00000000;
그린 = 8'b00000000;
블루 = 8'b00000000;
끝
끝
endmodule