싱글 포트 렘에 대하여 parameter를 이용한 read와 write를 행동하는 코드를 연습해보았다.

 

ram의 depth 가 2 ^ addr width 라는 것을 코드를 관찰하면 알 수 있고 

 

동기식 이기 때문에 clk이 뛰었을 때 read와 write 행동을 하는 것을 알 수 있다.

 

소스코드 :  https://github.com/ukjinlee66/Design-of-Digital-Systems/blob/master/ram_sp_sr_sw.v

 

ukjinlee66/Design-of-Digital-Systems

Contribute to ukjinlee66/Design-of-Digital-Systems development by creating an account on GitHub.

github.com

 

'Digital System(Verilog HDL)' 카테고리의 다른 글

동기식,비 동기식 FF  (0) 2019.04.14

FF이란 flip flop 의 약자로 정보를 보관,유지 하는 순차회로의 기본 요소이다.

 

여기서 동기식 과 비 동기식의 차이를 말한다면.

 

clk이 posedge 즉 clk 이 뛰면서 reset이 동시에 1일 경우만 값이 초기화되는 개념이라고 보면 된다.

 

소스코드 : https://github.com/ukjinlee66/Design-of-Digital-Systems/blob/master/sync_reset_d_ff.v

 

ukjinlee66/Design-of-Digital-Systems

Contribute to ukjinlee66/Design-of-Digital-Systems development by creating an account on GitHub.

github.com

test : https://github.com/ukjinlee66/Design-of-Digital-Systems/blob/master/tb_sync_reset_d_ff.v

 

ukjinlee66/Design-of-Digital-Systems

Contribute to ukjinlee66/Design-of-Digital-Systems development by creating an account on GitHub.

github.com

 

그리고 비 동기식이란 clk과는 상관없이 reset신호가 들어오면 즉시 값을 초기화하는 것으로 생각하면 된다.

 

소스코드 : https://github.com/ukjinlee66/Design-of-Digital-Systems/blob/master/async_reset_d_ff.v

 

ukjinlee66/Design-of-Digital-Systems

Contribute to ukjinlee66/Design-of-Digital-Systems development by creating an account on GitHub.

github.com

test : https://github.com/ukjinlee66/Design-of-Digital-Systems/blob/master/tb_async_reset_d_ff.v

 

ukjinlee66/Design-of-Digital-Systems

Contribute to ukjinlee66/Design-of-Digital-Systems development by creating an account on GitHub.

github.com

test 코드는 사실 차이는 없고 확인하는 차원에서 값을 대입해준 코드 이다.

'Digital System(Verilog HDL)' 카테고리의 다른 글

single port synchronous RAM  (0) 2019.04.14

+ Recent posts