한국기술교육대학교 장영조 - koreatech · 2016. 10. 31. · ram_we=1 :...
TRANSCRIPT
-
한국기술교육대학교장영조
-
한국기술교육대학교 전기전자통신공학부 2
본 슬라이드의 내용은 http://www.altera.com을 참조하였습니다.
-
1. FPGA 개념2. FPGA 구조3. FPGA 컨피겨레이션4. FPGA 메모리 설계
한국기술교육대학교 전기전자통신공학부 3
-
} Altera SRAM 계열 컨피겨레이션 scheme
} 컨피겨레이션 데이터 크기
MSEL1 MSEL0 컨피겨레이션 scheme
0 0
Active Serial (AS)
Passive Serial (PS)
JTAG
1 0 Passive Parallel Sync.(PPS)
1 1 Passive Parallel Async. (PPA)
소자 데이터크기(bits) 데이터크기 (bytes)
EP1K10 159,160 19,895
EP1K30 473,720 59,215
EP1K50 784,184 98,023
EP1K100 1,335,720 166,965한국기술교육대학교 전기전자통신공학부 4
-
v PS 컨피겨레이션 연결도
단일 FPGA
다중 FPGA
한국기술교육대학교 전기전자통신공학부 5
-
§ SRAM object file (.sof) : ByteBlaster를 사용하는 PS 컨피겨레이션§ Programming Object File (.pof) : EPC 소자에 다운로드§ Serial Bitstream File (.sbf) : BitBlaster를 사용하는 PS 컨피겨레이션§ Hexadecimal (Intel format) File (.hex) :
third party ROM 프로그래머, PPS, PPA 모드, parallel EPROM
} Download cable : ByteBlasterMV, ByteBlaster, USBBlaster§ PC에 10핀으로 연결되어 FPGA를 PS 방식으로 프로그래밍
한국기술교육대학교 전기전자통신공학부 6
-
} RAM § EAB를 사용한 메모리 설계§ 쿼터스 툴의 라이브러리 함수 사용
ü ROM, RAM, FIFO 등 설계§ Megawizard manager- memorycompiler-RAM 1port
§ RAM의 주소, 입출력 데이터 크기 설정
소자, 생성할 출력의 형태, 파일이름 설정한국기술교육대학교 전기전자통신공학부 7
-
§ 주소, 입출력 포트의 레지스터사용 설정
§ 메모리의 초기 정보 파일 설정
.mif (memory initialization file) 혹은 .hex 파일 형태 사용
한국기술교육대학교 전기전자통신공학부 8
-
§ RAM megafunction에서 생성되는파일 종류
§ 스키매틱 편집기에 생성된 ram1 심볼 호출
ram1.v : Verilog fileram1.bsf : 회로 심볼 파일
한국기술교육대학교 전기전자통신공학부 9
-
module ram1 ( address, data, inclock, we, q);input [7:0] address;input [9:0] data;input inclock;input we;output [9:0] q;wire [9:0] sub_wire0;wire [9:0] q = sub_wire0[9:0];lpm_ram_dq lpm_ram_dq_component (
.address (address), .inclock (inclock), .data (data),
.we (we), .q (sub_wire0), .outclock (1'b1));defparam
lpm_ram_dq_component.lpm_address_control = "REGISTERED",lpm_ram_dq_component.lpm_indata = "REGISTERED",lpm_ram_dq_component.lpm_outdata = "UNREGISTERED",lpm_ram_dq_component.lpm_type = "LPM_RAM_DQ",lpm_ram_dq_component.lpm_width = 10,lpm_ram_dq_component.lpm_widthad = 8;
endmodule
§ 생성된 ram1.v Verilog 파일ß 설계에서 사용
한국기술교육대학교 전기전자통신공학부 10
-
§ Megawizard manager- memorycompiler-ROM 1port
§ ROM의 주소, 입출력 데이터 크기 설정
소자, 생성할 출력의 형태, 파일이름 설정
한국기술교육대학교 전기전자통신공학부 11
-
§ 주소, 입출력 포트의 레지스터사용 설정
§ 메모리의 초기 정보 파일 설정
.mif (memory initialization file) 혹은 .hex 파일 형태 사용
한국기술교육대학교 전기전자통신공학부 12
-
§ ROM megafunction에서 생성되는파일 종류
§ 스키매틱 편집기에 생성된 rom1 심볼 호출
rom1.v : Verilog filerom1.bsf : 회로 심볼 파일
한국기술교육대학교 전기전자통신공학부 13
-
module rom1 ( address, inclock, outclock, q);input [6:0] address;input inclock;input outclock;output [9:0] q;wire [9:0] sub_wire0;wire [9:0] q = sub_wire0[9:0];lpm_rom lpm_rom_component (
.outclock (outclock), .address (address), .inclock (inclock),
.q (sub_wire0), .memenab (1'b1));defparam
lpm_rom_component.intended_device_family = "ACEX1K",lpm_rom_component.lpm_address_control = "REGISTERED",lpm_rom_component.lpm_file = "rom1_data.mif",lpm_rom_component.lpm_outdata = "REGISTERED",lpm_rom_component.lpm_type = "LPM_ROM",lpm_rom_component.lpm_width = 10,lpm_rom_component.lpm_widthad = 7;
endmodule
§ 생성된 rom1.v Verilog 파일ß 설계에서 사용
한국기술교육대학교 전기전자통신공학부 14
-
depth = 128;
width = 10;
address_radix = dec;
data_radix = hex;
content
begin
0: 222;
1: 001;
2: 002;
3: 003;
4: 004;
5: 005;
6: 006;
7: 007;
8: 008;
9: 009;
10: 1A0;
11: 111;
12: 112;
13: 213;
14: 214;
15: 315;
16: 316;
17: 317;
18: 318;
19: 019;
20: 020;
21: 021;
[22..26]: 3FF;
27: 3F7;
28: 3F8;
[29..126]:3F0;
127:3FA;
end;
§ mif 파일 형식
depth : 주소 최대 크기width : 데이터 비트address radix : 주소 표현 basedata radix : 데이터 표현 baseradix 종류 : bin, oct, hex, uns (양의 정수), dec(부호있는 정수)
저장될 데이터 내용1: 001 ß 1번지에 001 데이터 저장[22..26]:3FF ß 22~26번지에 모두 3FF
• 이와 같은 형태로 파일을 편집하여rom1_data.mif 와 같은 이름으로 저장
한국기술교육대학교 전기전자통신공학부 15
-
§ 쿼터스 툴에서 mif 파일 생성
(1) 메뉴
(2) 워드수,크기설정
(3) 데이터편집
(4) 저장된 파일보기
한국기술교육대학교 전기전자통신공학부 16
-
§ ram1과 rom1을 스키매틱 생성기에서 호출하여 아래 회로와 같이 연결 : ex_mem.bdf로 저장
§ 컴파일 후의 report 파일 : 사용한 메모리 양 확인
회로 동작 : rom1에 저장된 내용(rom1_data.mif)을 ram1에 쓰게한후 ram1의 출력 (ram_out)으로 읽어내게 한다.
한국기술교육대학교 전기전자통신공학부 17
-
§ 시뮬레이션 파형
ram_we=1 : ram1에 데이터 저장ram의 01,02는 222 저장, 03은 001저장
ram_we=0 : ram1의 데이터 읽기ram의 01,02번지에 222가 읽혀진다. 한국기술교육대학교 전기전자통신공학부 18