[전기공학실험3/ARM7] 예비5 - NAND 플래쉬 메모리
- 최초 등록일
- 2002.12.25
- 최종 저작일
- 2002.12
- 11페이지/ MS 워드
- 가격 1,000원
소개글
전기공학실험3 (ARM7 코어 프로그래밍)
서울대학교 전기공학부
성원용 교수님 강좌
2002년 2학기
정답이 아닐 수 있으니 참고만 하세요.
목차
1. 예비 보고 사항
(1) Flash Memory의 page를 program하는 함수를 제작한다.
int FlashWritePage(unsigned int addr, const insigned char* p_buf, const unsigned char* p_spare);
- addr : 주소 (page의 시작 번지)
- p_buf : 512byte data pointer
- p_spare : 16byte data pointer
(2) main 영역의 512byte data의 parity를 계산하여 spare 16byte를 만들어 내는 함수를 만들어라.
Void CalcParity(unsigned char *p_buf, insigned char *p_parity);
P_buf : 4096bit data pointer
P_parity : 128bit data pointer (result)
(3) int FlashWritePage2(unsigned int addr, const insigned char* p_buf) 함수를 구현한다.
Addr : page의 시작 주소
P_buf : 4096bit data pointer
(4) int FlasgReadPage2(unsigned int addr, const insigned char* p_buf)
Addr : page의 시작 주소 (8page 단위로 정렬된 주소)
P_buf : 읽어 온 데이터(4096bit)를 저장할 pointer
(5) SSFDC를 이용해서 32MB 플래시 메모리를 format하고, 임의의 text file (1kB 이상, test.txt)을 생성하는 SW를 작성하라. SSFDC를 이용해서 플래시 메모리의 test.txt 파일을 읽어서 LCD에 display하는 SW를 작성하라. (2)에서 작성한 SW와 번갈아가며 수행하여서 파일이 잘 작성되는지 확인한다.
본문내용
Row 방향과 column 방향으로 각각 64bit=8byte씩의 parity를 생성한다. 실험 교재에 parity 생성의 scheme이 있으므로 그것에 따르면 아래와 같다.
- Row parity
p_parity[0]=p_buf[0]^p_buf[1]^p_buf[2]^…^p_buf[63]
p_parity[1]= p_buf[64]^p_buf[65]^p_buf[66]^…^p_buf[127]
…
p_parity[63]=p_buf[63*64+0]^p_buf[63*64+1]^p_buf[63*64+2]^…^p_buf[63*64+63]
- Collumn parity
p_parity[64]=p_buf[0]^p_buf[64]^p_buf[128]^…^p_buf[4032]
p_parity[65]=p_buf[1]^p_buf[65]^p_buf[129]^…^p_buf[4033]
…
p_parity[127]= p_buf[0+63]^p_buf[64+63]^p_buf[128+63]^…^p_buf[4032+63]
각각은 row와 column 비트들의 XOR 연산의 연속이 된다. Row의 경우 address가 연속되어 있으므로 64bit=8byte를 한 번에 읽을 수 있지만, column은 address가 64bit씩 떨어져 있으므로 64bit씩 stride를 주어 읽어야 한다. 즉 column은 byte 단위로 입력을 받지 못하고 모든 bit를 따로 읽어야 하는 셈이다.
참고 자료
서울대학교 전기공학부, <3학년 실험>
서울대학교 전기공학부, <3학년 실험 매뉴얼>
Hennessy/Patterson , <Computer Organization and Design : the Hardware/Software Interface>
http://soee.net/