1 / 8

プロジェクト実習 LSI の設計と実現

プロジェクト実習 LSI の設計と実現. パイプラインプロセッサの設計 3. 修正. t.v clock_mem の記述を追加 \cad104publicProjectPracticePCPU_templatet.v. おさらい. 配線は wire 、 レジスタは reg 配線の接続は assign ( always の外で) レジスタへの代入は always の中で <= 代入時は両辺のビット幅を合わせる 各ステージ では 前段のパイプラインレジスタを読み込む 後段のパイプラインレジスタに 書き込む. ソースコード.

aleron
Download Presentation

プロジェクト実習 LSI の設計と実現

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. プロジェクト実習LSIの設計と実現 パイプラインプロセッサの設計3

  2. 修正 • t.v • clock_memの記述を追加 • \\cad104\public\ProjectPractice\PCPU_template\t.v

  3. おさらい • 配線はwire、レジスタはreg • 配線の接続は assign (alwaysの外で) • レジスタへの代入は alwaysの中で <= • 代入時は両辺のビット幅を合わせる • 各ステージでは • 前段のパイプラインレジスタを読み込む • 後段のパイプラインレジスタに書き込む

  4. ソースコード • IF/IDパイプラインレジスタの宣言 • IFステージのalways • ID/EXパイプラインレジスタの宣言 • IDステージのalways • EX/MEMパイプラインレジスタの宣言 • 以下同様 • 宣言を全部上にまとめて書いても良い

  5. 各ステージ • always @(posedge clock or negedge reset) begin • if (reset == 1'b0) begin • 全部のreg <= 初期化; • end else begin • case (???) • ADD: begin • いろんなreg<=値 • end • LDIH: begin • end • end • end どんな条件でもすべてのregに1回だけ 値が代入されていることを確認!!

  6. プログラム • LDIHr1, 0, 1 • LDIH r2, 0, 2 • LDIH r3, 0, 3 • LDIH r4, 0, 4 • LDIH r5, 0, 5 • LDIH r6, 0, 6 • LDIH r7, 0, 7 • ADD r1, r2, r3 • SUB r4, r5, r6

  7. 目標 • 例題を実行できるようにする • LOAD/STOREを考える • EXステージでアドレス計算 • MEMステージでメモリの読み書き

  8. 中島研の学生は • 今日中に完成すること

More Related