<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>작업 정리장</title>
    <link>https://daehyeon-mat.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Mon, 1 Jun 2026 16:29:02 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>:)=</managingEditor>
    <item>
      <title>MySQL 관련 도움되는 블로그</title>
      <link>https://daehyeon-mat.tistory.com/43</link>
      <description>&lt;p&gt;http://blog.naver.com/PostView.nhn?blogId=hj_veronica&amp;amp;logNo=220541570147&amp;amp;parentCategoryNo=&amp;amp;categoryNo=40&amp;amp;viewDate=&amp;amp;isShowPopularPosts=true&amp;amp;from=search&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;위의 것을 보고 하자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;ERD 그리는 것은 아래의 사이트나 위의 사이트에서 이걸로 그려라! 하는 프로그램이 있으니 보고 할것.&lt;/p&gt;&lt;p&gt;ERD를 그림으로 그리고 create table A(~~~)를 추출해 내는게 마음편하다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;http://aquerytool.com/ &amp;nbsp; &amp;nbsp;=&amp;gt; 이것은 인터넷으로 ERD 그리는 것.&lt;/p&gt;</description>
      <category>수업/DataBase</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/43</guid>
      <comments>https://daehyeon-mat.tistory.com/43#entry43comment</comments>
      <pubDate>Mon, 6 Jun 2016 19:47:12 +0900</pubDate>
    </item>
    <item>
      <title>poster</title>
      <link>https://daehyeon-mat.tistory.com/41</link>
      <description>&lt;p&gt;1. 시스템 구조 그리기..&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//////////////////////////////////검증 관련//////////////&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;a. ISIM 시뮬레이션 내부 bit 분석을 통해 동작 검증 (왼쪽 위는 시뮬레이션 결과(run.sh), 오른쪽은 ISIM 내부 bit 확인)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;b. FPGA상에서 동작 검증 ( 그림 3개를 통해서, 제일 왼쪽 위는 어떤 레지스터로 프로그램을 만들었는지, 오른쪽 위는 impact랑 minicom 스샷, 왼쪽 아래는 minicom에서 나온 결과 스샷)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;//////////////////////////////////성능 관련//////////////&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Software/Hardware 암호화의 속도 비교를 통한 성능 확인&lt;/p&gt;&lt;p&gt;NON, Sec, Soft&lt;/p&gt;&lt;p&gt;=&amp;gt; 숫자 only / 영문 포함 / 숫자 영문 섞어서&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;(현재 나와있는 )&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/41</guid>
      <comments>https://daehyeon-mat.tistory.com/41#entry41comment</comments>
      <pubDate>Fri, 6 Nov 2015 18:16:13 +0900</pubDate>
    </item>
    <item>
      <title>일단 다 끝내고 새로 enc on/off 명령어 추가하기</title>
      <link>https://daehyeon-mat.tistory.com/40</link>
      <description>&lt;p&gt;decode에서 type이 나오고, 여기서 type == SIMD_LDST이면 simd_enable_nxt = 1'd1로 되어 버린다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그러면 이제 type이 어떻게 결정되는지를 살펴보면,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;instruction을 보고 알 수 있다. 여기서, instruction[27:4]를 보고 type을 결정하게 되는데,&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;순서가 중요하다고 한다. 그래서 여기서 우리가 쓸 수 있는 instruction은&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;24'b1101??0?????????101????? : type = SIMD_LDST; 이것을 쓸 수 있을 것 같다. 그래서 이 instruction이 오게 된다면, on, off를 바꿔주는 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그렇다면 instruction은 어디서 오는지를 살펴봐야 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;assign instruction &amp;nbsp; &amp;nbsp; &amp;nbsp;= &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; instruction_sel == 2'd0 ? o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; instruction_sel == 2'd1 ? saved_current_instruction :&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pre_fetch_instruction &amp;nbsp; &amp;nbsp; ;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이렇게 되어있으니, 1. o_read_data나 2. saved_current_instruction이나 3. pre_fetch_instruction에서 볼 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1. 그러면 o_read_data부터 살펴보면 다음과 같이 나온다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이것은 always @ ( posedge i_clk )&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if (!i_fetch_stall)&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; begin &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;= i_read_data;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt;o_simd_read_data&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;	&lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;lt;= i_simd_read_data; //@sungbo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이렇게 되어있는 것으로 보아 stall상태가 아닌 경우에 i_read_data가 들어오는 것이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그렇다면 i_read_data는 어디서 오는 것인지를 살펴보면&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;input으로 들어오는 것이다. 이것은 fetch.v의 o_read_data에서 나오는 것인데.,&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;assign o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; = sel_cache &amp;nbsp;? cache_read_data :&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sel_wb &amp;nbsp; &amp;nbsp; ? wb_dat32 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: //@sungbo&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 32'he3a00000 &amp;nbsp; &amp;nbsp;;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이렇게 되어있는 것으로 봐서 A. cache_read_data 혹은 B. wb_dat32 로부터 오는 것임을 알 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1-A. 그렇다면 cache_read_data는 어디서 오는 것인지 확인해보면 cache.v에서 o_read_data와 연결이 되어 있는 것을 알 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그렇다면 cache.v로 가서 보면&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;assign o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp;= wb_read_buf_hit &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;? wb_read_buf_data &amp;nbsp; :&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i_address[WORD_SEL_MSB:WORD_SEL_LSB] == 2'd0 ? hit_rdata [31:0] &amp;nbsp; :&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i_address[WORD_SEL_MSB:WORD_SEL_LSB] == 2'd1 ? hit_rdata [63:32] &amp;nbsp;:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i_address[WORD_SEL_MSB:WORD_SEL_LSB] == 2'd2 ? hit_rdata [95:64] &amp;nbsp;:&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;hit_rdata [127:96] ;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이렇게 되어있다. 그러면 a. wb_read_buf_data와 b. hit_rdata로 되어있으니 하나씩 살펴보면&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;1-A-a. wb_read_buf_data는 다음과 같다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;always @ ( posedge i_clk )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; begin&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; if ( c_state == CS_FILL1 || c_state == CS_FILL2 ||&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c_state == CS_FILL3 || c_state == CS_FILL4 )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; begin&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ( !i_wb_stall )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; begin&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wb_read_buf_valid &amp;nbsp; &amp;lt;= 1'd1;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wb_read_buf_address &amp;lt;= i_wb_address;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wb_read_buf_data &amp;nbsp; &amp;nbsp;&amp;lt;= i_wb_read_data;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; end&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; else &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; wb_read_buf_valid &amp;nbsp; &amp;lt;= 1'd0;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; end&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이렇게 되어있다. 그러므로 fill state일 때, i_wb_read_data가 들어오는 것이다. 그렇다면 이것은&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;input으로 들어오는 것인데, 이것은 fetch.v에서 i_wb_dat와 연결되고&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그것은 core에서 input으로 받아서 들어오는 i_wb_dat이다.&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/40</guid>
      <comments>https://daehyeon-mat.tistory.com/40#entry40comment</comments>
      <pubDate>Fri, 6 Nov 2015 00:28:38 +0900</pubDate>
    </item>
    <item>
      <title>남은것</title>
      <link>https://daehyeon-mat.tistory.com/39</link>
      <description>&lt;p&gt;1. vmlinux 패치하기(vmlinux - README 참고)&lt;/p&gt;&lt;p&gt;2. 패치한 vmlinux로 원래 있던 initrd-200k-hello-world가 실행이 되는지 확인.&lt;/p&gt;&lt;p&gt;&amp;nbsp; 실행이 되면, 원래있던 hello-world.flt을 사용해서 새로 제작한 initrd로 실행이 되는지 확인.&lt;/p&gt;&lt;p&gt;3. Credit.c 제작하기.&lt;/p&gt;&lt;p&gt;4. Credit.c와 hello-world 폴더에 있는 Makefile, Start.S, section.lds를 사용하여 elf, flt파일 제작.&lt;/p&gt;&lt;p&gt;5. initrd-credit제작해서 보드에서 실행확인.&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/39</guid>
      <comments>https://daehyeon-mat.tistory.com/39#entry39comment</comments>
      <pubDate>Sat, 31 Oct 2015 21:46:07 +0900</pubDate>
    </item>
    <item>
      <title>일단 simulation 모두 완료 후 FPGA에 올리기 -(1)</title>
      <link>https://daehyeon-mat.tistory.com/38</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;현재 상태는, 시뮬레이션이 모두 완료된 상태이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;이제 fpga에 AES module을 추가한&amp;nbsp;것을 올려야 되는데,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;그 전에 변경한 소스가 아닌&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;원본을 먼저 올려볼 생각이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;그래서 다시 원본 파일을 불러와서&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;./run.sh -5 -s hello-world가 잘 돌아가는 것을 확인하였다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;(-s는 spartan6 library를 쓴다는 것이다.)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;그리고 ddr3를 Xilinx core generation을 통해 만들어서 넣어주었다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;해당 ddr3는 license때문에 amber에서 추가해 주지 않는다. 그래서&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;amber/trunk/hw/vlog/xs_ddr3에서 README.txt를 보고 Coregen으로&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;ddr3를 만든 뒤에 써있는 대로 수정을 해 주었다.(해당 파일은 dropbox에)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;CentOS 6를 쓸 때에 해주라는 설정은 일단 넘기고 갔고 그 뒤도 넘겼다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;(In order to use Impact on CentOS 6, you need to install a USB driver.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;sudo yum install libusb-devel&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Then download and make the usb driver from http://rmdir.de/~michael/xilinx/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Once its successfully compiled run setup_pcusb to add the device IDs to the Xilinx installation.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;You also need to install the fxload package&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;sudo rpm -i fxload-2008_10_13-3.el6.i686.rpm&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;And reboot after installing it.)&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;이 부분.....&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5;&quot;&gt;그리고 bit file을 만들고 아래에 있는 것을 할 예정이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;(Then power on the SP605 board and connect its USB-JTAG port to your PC.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Then run impact as follows&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;export LD_PRELOAD=/your-path/libusb-driver.so&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;impact&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Impact should now be able to auto-detect the FPFA card. Right click on the FPGA and select the bitfile to load into it.)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;자 일단 여기까지 했으면, 이제 bitfile을 만들 것이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;그를 위해서 hw/fpga/bin에 들어가서&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;make new A25=1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;이라고 명령어를 입력하면 자동으로 bit 파일을 만들어 준다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;그러면 hw/fpga/bitfiles 폴더에 bit파일이 생성된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;이제 impact를 켜려면, opt/Xilinx/14.7/ISE_DS/ISE/bin/lin 에 들어가서&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;./impact를 하면 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;그리고 나서 fpga/flash에 있는 readme에 있는 대로 해주었다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;==================readme.txt=======================&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Xilinx Flash/PROM - Write bitfile to SPI serial flash&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;The included file boot-loader-ethmac.mcs is a flash configuration file&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;for the SPI (serial) flash on the SP605 FPGA development board.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;It contains the boot-loader-ethmac design. Here are instructions on how to create an mcs file&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;and how to load it onto the SP605 board. These instructions are for Xilinx ISE 14.5.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;1. Start impact. Select Prepare a PROM file&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Step 1. Select Storage Target&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;SPI Flash -&amp;gt; Configure single FPGA&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Step 2. Add Storage Device&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;64M&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Step 3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;File Format MCS&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Add Non_Configuration Files No&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Select the bitfile to write&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Would you like to add another device file to Revision:0 ? No&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Impact Process-&amp;gt;Generate File...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Impact creates an MCS file and says Generate Succeeded.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Then restart impact and select Boundary Scan flow&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Right mouse on the FPGA and select Add SPI/BPI Flash&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;=&amp;gt; 여기서&amp;nbsp;module windrvr6 is not loaded. please reinstall the cable &amp;nbsp; &amp;nbsp;라고 뜨면서&amp;nbsp;driver가 없다고 해서 그것에 대해 찾아보는 중...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;http://www.silabs.com/products/interface/Pages/interface-software.aspx#cp210x &amp;nbsp; 여기서 드라이브 설치함&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;(이것을 위해 자바 깔아야됨&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* default-jdk&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* ecj&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* gcj-4.6-jdk&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* openjdk-6-jdk&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* gcj-4.5-jdk&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;* openjdk-7-jdk&lt;/span&gt;&lt;/p&gt;&lt;div&gt;)이것들 깔아보자. - sudo apt-get install&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;==&amp;gt; 그래도 안됨..&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;일단 sudo apt-get install portmap &amp;nbsp;을 해줌..&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;http://ubuntuforums.org/showthread.php?t=1547435&amp;amp;page=3&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;위의 것을 보고 해당 위치에 깔고 export 해줌.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;//위에껀 다 쓸모없고 우클릭해서 일단 bit file을 다시 업로드하면 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Select Attached SPI/BPI dialogue&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;SPI PROM -&amp;gt; W25Q64FV&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Data Width: 1&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Then a Flash device appears in the Boundary scan window attached the tje xc6slx45t FPGA.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Right mouse on the Flash and select Program&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;// 여기서 program 하려면 usb연결이 안된대서 usb 연결을 또 다시 찾고있음.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;//http://www.george-smart.co.uk/wiki/Xilinx_JTAG_Linux 일단 이것을 참조하고 initialize chain을 누르면 자동으로 fpga가 뜨게 된다...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;This takes a couple of minutes.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;To use that image, you need the following switch settings on the SP605 board;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;SW1 (the 2-switch block box near the red on/off power switch in the upper right corner of the board)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;M0=on, M1=off&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Then press the PROG button just below it to load that bitfile from the SPI flash into the FPGA.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;To use the Parallel flash&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&amp;nbsp;M0=off, M1=off&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;Online tutorial for instructions with pictures -&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 16px; line-height: 21.8182px;&quot;&gt;http://www.digilentinc.com/Data/Documents/Tutorials/MCS%20File%20Creation%20with%20Xilinx%20ISE%20Tutorial.pdf&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/38</guid>
      <comments>https://daehyeon-mat.tistory.com/38#entry38comment</comments>
      <pubDate>Tue, 27 Oct 2015 16:47:47 +0900</pubDate>
    </item>
    <item>
      <title>버전2_read, write시에 잠시 정지시켰다가 enc/dec완료 신호가 오면 진행</title>
      <link>https://daehyeon-mat.tistory.com/37</link>
      <description>&lt;p&gt;1. 일단 state = 0일 때, read시에 어떻게 해야 할 것인가?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;state == 0일 때, cyc, stb signal이 1로 오면서 read를 요구한다.&lt;/p&gt;&lt;p&gt;이 때, cyc, stb는 같이 1이 되고, ack를 받아서 바로 core쪽으로 주면 안된다.&lt;/p&gt;&lt;p&gt;일단 ack를 받게 되면, core쪽에는 0으로 hold 시켜 놓고,&amp;nbsp;&lt;/p&gt;&lt;p&gt;ack를 decrypt start signal로 사용하여 decrypt를 진행시킨다.&lt;/p&gt;&lt;p&gt;그리고 decrypt가 끝나면 dec_done signal이 1이 될 것이다.&lt;/p&gt;&lt;p&gt;그러면 이 dec_done signal을 core쪽으로 보내는 ack 신호로 사용하면 된다.&lt;/p&gt;&lt;p&gt;(이거 완료신호 1clk만 1로 주면 되겠지?)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. state가 1일 때, read를 할 것이다.&lt;/p&gt;&lt;p&gt;이 때도 state = 0일 때와 동일하게 ack를 받으면 core쪽에는 0으로 hold 시켜 놓고&lt;/p&gt;&lt;p&gt;ack를 decrypt start signal로 사용하여 i_wb_dat_i 를 decrypt 시킨다.&lt;/p&gt;&lt;p&gt;그리고 decrypt_done signal이 1이 되는 것을&lt;/p&gt;&lt;p&gt;state를 2로 보내는 signal로 사용하면 된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3. state == 2일 때, write를 할 것이다.&lt;/p&gt;&lt;p&gt;state가 2를 encrypt start signal로 사용한다.&lt;/p&gt;&lt;p&gt;그래서 바로 encrypt를 시작한다. ( 1 clk만&amp;nbsp;되도록 해야됨 )&lt;/p&gt;&lt;p&gt;그리고 encrypt_done signal이 들어오면 stb, cyc, we_o를 1로 준다..&lt;/p&gt;&lt;p&gt;여기서 ack가 들어오면 다시 state를 0으로 보내준다.&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/37</guid>
      <comments>https://daehyeon-mat.tistory.com/37#entry37comment</comments>
      <pubDate>Tue, 13 Oct 2015 22:48:10 +0900</pubDate>
    </item>
    <item>
      <title>버전1을 작성할 때</title>
      <link>https://daehyeon-mat.tistory.com/36</link>
      <description>&lt;p&gt;1. write에 대해 분석한 것을 바탕으로 모듈을 제작 했는데 안됨&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2. 안되서, isim에서 파형을 보려고 했음&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;3. 아예 프로그램이 돌아가지 않으면 파형이 안나옴&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;4. 다시 원래 파일을 받아서 그것에서 파형을 봤음&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;5. 거기서 hello-world.dis 어셈블리어의 순서를 보고, store, load, push, pop등을 찾아 waveform을 확인함.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;6. 확인한 결과, 시뮬레이션과 실제로 스파르탄을 써서 할 때에, 사용하는 캐쉬(sram)가 다름....&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;7. 그래서 현재 메모리에서 read를 해와서 그것을 다시 write하는 방법으로 회귀를 함 그리고 보다가 이상한 것을 발견.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;8. 11972.5ns에서 이상한 것을 찾음. write하겠다고 하자마자 바로 ack가 뜸...&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;9. main_mem와 wishbone_arbiter를 확인해보려고 각각 waveform을 보려고 했는데 segmentation fault가 뜸.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;10. 하나하나 올려서 확인해봤는데 ack가 assign으로 연결되어 있어서 그렇다고 생각됨. 그럼 이제 이상한 것이 뭐냐면..&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;11.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;=============================&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;state가 0인 상태...&lt;/p&gt;&lt;p&gt;이 상태는 그냥 계속 read만 하고 있는 상태이다.&lt;/p&gt;&lt;p&gt;이 상태에서 cyc, stb, we 가 모두 1이 되면 state를 1로 바꿔준다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;state가 1인 상태...&lt;/p&gt;&lt;p&gt;이 상태에서는 다른 것은 모두 그대로 인데, we만 0으로 바꾸어 준다.&lt;/p&gt;&lt;p&gt;이 상태에서, ack가 1이 되면, state 2로 이동한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;state가 2인 상태..(read를 해왔고 write를 해야 되는 상태)&lt;/p&gt;&lt;p&gt;이 상태에서는 들어오는 sel을 보고, data를 치환해서 밖으로 내보내준다.&lt;/p&gt;&lt;p&gt;이 상태에서는 we는 1로 넘겨주고 ack가 1이면 state를 0으로 바꿔준다.&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/36</guid>
      <comments>https://daehyeon-mat.tistory.com/36#entry36comment</comments>
      <pubDate>Tue, 13 Oct 2015 22:33:52 +0900</pubDate>
    </item>
    <item>
      <title>메모리에서 read하고 write 하는 것.. 버전1이라 생각하면 됨.</title>
      <link>https://daehyeon-mat.tistory.com/35</link>
      <description>&lt;p&gt;캐쉬에 쓰이는 sram이 시뮬레이션 때와 fpga에 올릴 때 다르다는 것을 알게 되어 이것으로 했음.&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block;   height: auto; max-width: 100%;&quot;&gt;&lt;a href=&quot;https://t1.daumcdn.net/cfile/tistory/236BBD46561D07AE1F&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/gz.gif&quot; style=&quot;vertical-align: middle;&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;v1_메모리에서 read하고 write하는 것.tar.gz&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/35</guid>
      <comments>https://daehyeon-mat.tistory.com/35#entry35comment</comments>
      <pubDate>Tue, 13 Oct 2015 22:31:47 +0900</pubDate>
    </item>
    <item>
      <title>모듈 만들기</title>
      <link>https://daehyeon-mat.tistory.com/34</link>
      <description>&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;일단 캐시로 올리는 부분을 찾아야 되는데, a25_dcache.v에서 아래와 같은 부분이 있음.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;generate&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; for ( i=0; i&amp;lt;WAYS;i=i+1 ) begin : rams&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Tag RAMs&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_SPARTAN6_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xs6_sram_256x21_line_en&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_VIRTEX6_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xv6_sram_256x21_line_en&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifndef XILINX_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generic_sram_line_en&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #(&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .DATA_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( TAG_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .INITIALIZE_TO_ZERO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .ADDRESS_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( CACHE_ADDR_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp;))&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_tag (&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( tag_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( tag_wenable_way[i] &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( tag_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( tag_rdata_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Data RAMs&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_SPARTAN6_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xs6_sram_256x128_byte_en&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_VIRTEX6_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xv6_sram_256x128_byte_en&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifndef XILINX_FPGA&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generic_sram_byte_en&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #(&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .DATA_WIDTH &amp;nbsp; &amp;nbsp;( CACHE_LINE_WIDTH) ,&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .ADDRESS_WIDTH ( CACHE_ADDR_WIDTH) )&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_data (&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wenable_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_byte_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( {CACHE_LINE_WIDTH/8{1'd1}} &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_rdata_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per tag-ram write-enable&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign tag_wenable_way[i] &amp;nbsp;= tag_wenable &amp;amp;&amp;amp; ( select_way[i] || source_sel[C_INIT] );&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per data-ram write-enable&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign data_wenable_way[i] = (source_sel[C_FILL] &amp;amp;&amp;amp; select_way[i]) ||&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(write_hit &amp;amp;&amp;amp; data_hit_way[i] &amp;amp;&amp;amp; c_state == CS_IDLE) ||&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(consecutive_write &amp;amp;&amp;amp; data_hit_way_r[i]);&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per data-ram idle_hit flag&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign data_hit_way[i] &amp;nbsp; &amp;nbsp; = tag_rdata_way[i][TAG_WIDTH-1] &amp;amp;&amp;amp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tag_rdata_way[i][TAG_ADDR_WIDTH-1:0] == i_address[31:TAG_ADDR32_LSB] &amp;amp;&amp;amp; &amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c_state == CS_IDLE; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; end &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;endgenerate&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;=========================================================&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;여기서 아래의 구문이 128 bits짜리 데이터를 캐쉬에 쓰는 구문임.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wenable_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;그렇기 때문에 이 부분에 wiring을 외부로 연결해서 aes 모듈에 연결시켜야됨.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;그리고 아래의 byte_enable은 16'hffff이기에, 앞서 살펴봤던 것 같이 모든 데이터를 다 쓴다는 의미로&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;받아들일 수 있음.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;그러면 여기서 한가지 고려해야할 사항이,&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;문제 1. data를 쓰고 ack 신호가 오기 전에 다른 data를 쓰라고 바뀌면 어떻게 할 것인가?&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;=&amp;gt; 그래서 이 문제 해결을 위해서는 queue를 만드는 방법이 제일 좋을 것 같음...&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;문제 2. write miss가 나면 어떻게 될 것인가? 메모리에서 데이터를 받아오고 다시 하나?&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;=&amp;gt; 상관 없을 것 같음... 무시 가능할듯.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;==================================================================&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;그러면 해야할 stage로는,&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;1. 일단 aes 모듈에 wiring을 통해 연결하기&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;2. write시에는 write 하고 싶다는 신호가 오면&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp;a. 큐에 데이터가 존재한다면 존재하는 데이터를 메모리로 보내기&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp;b. 큐에 데이터가 없다면&amp;nbsp;연결된 wire에서 dcache_&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;diff 신호가 1이 될 때까지 기다리기&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;(여기서 중요한 것이, 연동이 잘 되어서 항상 큐에 1개만 쌓이게 될 수가 있는데 그렇다면 이렇게 큐를 만들어 줄 필요가 없는 것임 =&amp;gt; 속도상승)&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;3. dcache_diff신호가 1이 되면 데이터를 큐에 넣기&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;3. 큐에 뭔가 존재하면 거기 있는 데이터를 램으로 보내기&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;4. ack가 오면 코어로 ack 신호를 보내기.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;5. read신호에 대해서는 read중에 dcahce_diff signal이 올 수도 있다.....(맞나??)&amp;nbsp;그 때는 큐에만 넣어주면 될듯...&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;6. write 중에는 read 하고자 할 수 없음. 왜냐면 당연히, write가 끝나고 aes 모듈에 read하고 싶다고 올 테니까.......&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/34</guid>
      <comments>https://daehyeon-mat.tistory.com/34#entry34comment</comments>
      <pubDate>Tue, 15 Sep 2015 03:34:33 +0900</pubDate>
    </item>
    <item>
      <title>cache에 쓰는 128bits를 그대로 encryption해서 메모리에 쓰기</title>
      <link>https://daehyeon-mat.tistory.com/33</link>
      <description>&lt;p&gt;일단 캐시로 올리는 부분을 찾아야 되는데, a25_dcache.v에서 아래와 같은 부분이 있음.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;generate&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; for ( i=0; i&amp;lt;WAYS;i=i+1 ) begin : rams&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Tag RAMs&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_SPARTAN6_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xs6_sram_256x21_line_en&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_VIRTEX6_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xv6_sram_256x21_line_en&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifndef XILINX_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generic_sram_line_en&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .DATA_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( TAG_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .INITIALIZE_TO_ZERO &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( 1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .ADDRESS_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( CACHE_ADDR_WIDTH &amp;nbsp; &amp;nbsp; &amp;nbsp;))&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_tag (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( tag_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( tag_wenable_way[i] &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( tag_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( tag_rdata_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; );&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Data RAMs&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_SPARTAN6_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xs6_sram_256x128_byte_en&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifdef XILINX_VIRTEX6_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xv6_sram_256x128_byte_en&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `ifndef XILINX_FPGA&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; generic_sram_byte_en&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; `endif&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #(&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .DATA_WIDTH &amp;nbsp; &amp;nbsp;( CACHE_LINE_WIDTH) ,&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .ADDRESS_WIDTH ( CACHE_ADDR_WIDTH) )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; u_data (&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( i_clk &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wenable_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_byte_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( {CACHE_LINE_WIDTH/8{1'd1}} &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .o_read_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_rdata_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per tag-ram write-enable&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign tag_wenable_way[i] &amp;nbsp;= tag_wenable &amp;amp;&amp;amp; ( select_way[i] || source_sel[C_INIT] );&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per data-ram write-enable&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign data_wenable_way[i] = (source_sel[C_FILL] &amp;amp;&amp;amp; select_way[i]) ||&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(write_hit &amp;amp;&amp;amp; data_hit_way[i] &amp;amp;&amp;amp; c_state == CS_IDLE) ||&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;(consecutive_write &amp;amp;&amp;amp; data_hit_way_r[i]);&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Per data-ram idle_hit flag&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; assign data_hit_way[i] &amp;nbsp; &amp;nbsp; = tag_rdata_way[i][TAG_WIDTH-1] &amp;amp;&amp;amp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tag_rdata_way[i][TAG_ADDR_WIDTH-1:0] == i_address[31:TAG_ADDR32_LSB] &amp;amp;&amp;amp; &amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c_state == CS_IDLE; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp; &amp;nbsp; end &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;endgenerate&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;=========================================================&lt;/p&gt;&lt;p&gt;여기서 아래의 구문이 128 bits짜리 데이터를 캐쉬에 쓰는 구문임.&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_data &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wdata &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_write_enable &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ( data_wenable_way[i] &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ),&lt;/p&gt;&lt;p style=&quot;line-height: 16.3636px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .i_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( data_address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;),&lt;/p&gt;&lt;p&gt;그렇기 때문에 이 부분에 wiring을 외부로 연결해서 aes 모듈에 연결시켜야됨.&lt;/p&gt;&lt;p&gt;그리고 아래의 byte_enable은 16'hffff이기에, 앞서 살펴봤던 것 같이 모든 데이터를 다 쓴다는 의미로&lt;/p&gt;&lt;p&gt;받아들일 수 있음.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;그러면 여기서 한가지 고려해야할 사항이,&amp;nbsp;&lt;/p&gt;&lt;p&gt;문제 1. data를 쓰고 ack 신호가 오기 전에 다른 data를 쓰라고 바뀌면 어떻게 할 것인가?&lt;/p&gt;&lt;p&gt;=&amp;gt; 그래서 이 문제 해결을 위해서는 queue를 만드는 방법이 제일 좋을 것 같음...&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;문제 2. write miss가 나면 어떻게 될 것인가? 메모리에서 데이터를 받아오고 다시 하나?&lt;/p&gt;&lt;p&gt;=&amp;gt; 상관 없을 것 같음... 무시 가능할듯.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;==================================================================&lt;/p&gt;&lt;p&gt;그러면 해야할 stage로는, 일단 aes 모듈에&amp;nbsp;&lt;/p&gt;</description>
      <category>수업/졸업논문-Amber</category>
      <author>:)=</author>
      <guid isPermaLink="true">https://daehyeon-mat.tistory.com/33</guid>
      <comments>https://daehyeon-mat.tistory.com/33#entry33comment</comments>
      <pubDate>Mon, 14 Sep 2015 21:44:29 +0900</pubDate>
    </item>
  </channel>
</rss>