Computer Science Laboratory and Exercise 3 (Hardware)

First half of the first semester in AY2024 (For third grade students)

─── Building a Microcomputer ───

English pages are provided only for reference.
Translation in progress.


Coronavirus(COVID-19)Measures

This year's Computer Science Laboratory and Exercise 3 (Hardware) will be conducted in person.
Online tools are made available to assist you in your exercise environment. Work on enhancing your ability to work remotely.
  • GitHub Classroom:

  • Overview of the Project

    In this project, we will build a microcomputer using a programmable LSI called FPGA.

    PowerMedusa board is used to build the microcomputer, and the logic CAD tool Quartus Prime 20.1 is used for logic design. By programming the FPGA on the PowerMedusa board as a processor, the entire board can be made to operate as a single microcomputer.

    The architecture of the processor to be implemented follows the SIMPLE architecture. In this project, everything from system design to logic design of this processor is carried out.
    The goal of the project is not only to design according to the given specifications and principles, but also to make your own improvements and enhancements. We will also quantitatively evaluate and discuss the effectiveness of various extensions and optimization techniques for processor architectures.

    There are three reports to be submitted: an introductory assignment on the design of 7SEG LED circuits and counters, a mid-term report and a final report on the processor design exercise. In the final report, a demonstration and sales talk will also be assigned.

    Experiments will be carried out in small groups. Git is used for sharing and version control of the design data in the group. GitHub Classroom will be used to submit the design data for the reports. GitHub Classroom will also be used for debugging consultation.

    Finally, in the final demonstration, the students will actually run an application program on the microcomputer you have built in this project.
    We will hold a sorting speed contest where you can compete for the performance of the processor you have built. Participation is optional, but encouraged.


    What's New

    What's New History


    Notes on Attending the Project

    Read the following pages and reference materials carefully before attending this project.


    Calendar

    The deadlines for submission of the reports and progress to be made are shown as a guideline.
    By the time you submit your mid-term report, it is desirable that a design that can run some instructions is completed and a processor that meets the basic specifications and principles of SIMPLE is essentially ready.

    Date TA Event Progress Guideline
    Apr. 11 (Thu) PMMatsumotoIntroductory Lecture 1
    (HDL,CAD)
    Conduct of introductory assignments to gain proficiency in CAD
    System design and function design
    Deciding on the division of labor and scheduling the design period
    Apr. 12 (Fri) AMSaito, Akagawa
    Apr. 12 (Fri) PMUrakawa, Sakoda
    Apr. 18 (Thu) PMMatsumoto, Ueda, SakodaIntroductory Lecture 2
    (SIMPLE)
    Logic design of each functional block
    Apr. 19 (Fri) AMSaito, Akagawa, UrakawaIntroductory Report
    Apr. 19 (Fri) PMUrakawa, Sakoda
    Apr. 25 (Thu) PMMatsumoto, Ueda, Sakoda Logic design and debugging of the processor
    Apr. 26 (Fri) AMSaito, Akagawa, Urakawa
    Apr. 26 (Fri) PMUrakawa, Sakoda
    May 9 (Thu) PMMatsumoto, Ueda, Sakoda Preparation for the mid-term demonstration (execution of instructions, study of demonstration scenarios)
    + Functional design of the extended architecture
    May 10 (Fri) AMSaito, Akagawa, Urakawa
    May 10 (Fri) PMUrakawa, SakodaMid-term Demonstration
    Mid-term Report
    May 16 (Thu) PMMatsumoto, Ueda, Sakoda Logic design and debugging of the extended architecture
    May 17 (Fri) AMSaito, Akagawa, Urakawa
    May 17 (Fri) PMUrakawa, Sakoda Developing and debugging application programs
    May 23 (Thu) PMMatsumoto, Ueda, Sakoda
    May 24 (Fri) AMSaito, Akagawa, Urakawa
    May 24(Fri) PMUrakawa, Sakoda Preparing for the final demonstration (developing the application program)
    + Debugging and performance evaluation
    May. 30 (Thu) PMMatsumoto, Ueda, Sakoda
    May. 31 (Fri) AMSaito, Akagawa, Urakawa
    May. 31 (Fri) PMUrakawa, SakodaFinal Demonstration
    Jun. 7 (Fri)Final Report

    Staff

    Faculty members

     PositionRoomExtension No. GitHub
    Jun Kawahara Associate ProfessorIntegrated Research Bldg. No.7, Room 230 5382 junkawahara
    Ryota Yasudo Assistant ProfessorIntegrated Research Bldg. No.7, Room 335 5383 r-ricdeau
    Kei Shimonishi Assistant ProfessorIntegrated Research Bldg. No.5, Room 306 7480 smnimo
    Kazunari Kato Technical StaffIntegrated Research Bldg. No.7, Room 335 5397 kazunarikato

    Teaching Assistants

      Year Lab GitHub Core Time
    Naoki Matsumoto D2 Okabe Lab. naoki9911 Thursday PM
    Kazuki Saio M2 Minato Lab. ceblab Friday AM
    Yuki Akagawa M2 Minato Lab. YukiAkagawa23 Friday AM
    Itsuki Urakawa M2 Minato Lab. itscreek Friday AM, Friday PM
    Yuito Ueda M1 Minato Lab. ueffy Thursday PM
    Shoji Sakoda M1 Iwashita Lab. nzqatd Thursday PM, Friday PM

    Assignments/Demonstrations

    There are three report assignments/demonstrations: introductory assignment, mid-term report, and final report.
    The introductory assignment consists of submission of a report only, while the mid-term and final reports consist of submission of a report and a demonstration.
    Each deadline is given as a guideline. Even if the deadline is not met, we will provide sufficient support, so you can proceed according to your own exercise environment and pace. (However, it is not advisable to put off writing the report because it is tedious, and to proceed with the implementation first.)

    Git/GitHub

    The report and design data must be submitted via GitHub Classroom.
    For initial setup, refer to the PandA notification "HW:GitHub Classroomの登録方法".

    Those who are new to Git and GitHub should read the following document. It provides an overview and explanation of basic usage.

    Using Git

    Note: Making the GitHub repository public, or adding collaborators, etc., (i.e., making the created design data and report documents available to others) is strictly prohibited from the standpoint of prevention of cheating and other forms of academic fraud.

    Introductory Assignment

    Details and Report:
    Students are required to design a 7SEG LED drive circuit and a counter individually and submit a report on the details of the design.
    Note that this is not an exam answer sheet, but an experimental report.
    Submission Deadline:
    April 19 (Fri) 13:15
    Submission Method:
    Submit the report by placing the report and design data as shown in the submission details below and creating a release for the tag name (Tag version) called submit in the repository 2024-intro-[account name] in GitHub Classroom.
    The assignment is considered submitted when the release is created.
    To resubmit, you must create a new release with a suffix number such as submit-1.
    Submission Details:
    1. Place the report document (in PDF format only) in the top directory of the remote repository with the file name intro.pdf.
      The document should have a cover page. The cover page should indicate the name of the document, the student number and name, and the date of submission, etc.
    2. The design data should be included in this repository.

    Processor Design Exercise

    Mid-Term Report

    Demonstration [Running demonstration of the processor]
    Date and Time: May 10th (Fri) 13:15-16:30
    After downloading the designed processor onto the PowerMedusa board, demonstrate that some instructions are running. Be creative in how you show this.
    Report [Final specifications of the processor to be designed]
    Submission Deadline: May 10th (Fri) 18:15
    Submission Method: Submit the report by creating a release for the tag name (Tag version) called middle in the repository of 2024-simple-team[team number] in GitHub Classroom. The assignment is considered submitted when the release is created. To resubmit, you must create a new release with a suffix number such as middle-1.

    Materials to be Submitted: Reports as indicated below and design data at the time of the mid-term report.
    Content of the Report: Summarize the following information about the final design of the processor. Each document should have a cover page. The cover page should indicate the name of the document, the student number and name, and the date of submission, etc. Create a directory named report_middle at the top of the remote repository, and place each report document (PDF format only) in the directory with the file names shown in blue below.
    1. [1 copy per group] Architecture Study Report (File name: architecture_study_report.pdf) "What to achieve"
      1. Specification requirements, design goals, design principles, and features
        • Functionalities to achieve, target values for performance, etc
      2. Acceleration/parallel processing methods
        • Extended instructions, operating frequency, pipelining, parallelization, etc
      3. Performance/cost prediction
        • How many times the performance and amount of hardware compared to SIMPLE/B, and is this a reasonable estimate?
        • Computation time for sorting speed contest, estimating number of cycles, etc.
      4. Considerations, etc.
    2. [1 copy per group] System Design Specifications (File name: system_design_spec.pdf) "How to implement"
      • Overview
      • Instruction set architecture
      • Structure and operation
    3. [1 copy per person] Functional Design Specifications (File name: function_design_spec-[student number].pdf) "Specific methods of implementation"
      • How was the whole system segmented into components? (Reprint and explain the block diagram in the system design specifications.)
      • External specifications of the components for which you are responsible for designing.
      • Internal specifications of the components for which you are responsible for implementation
    4. [1 copy per group] Implementation Status Report (File name: status_report.pdf)
      • Division of labor: How each group member plans to divide the design of each block that makes up the processor?
      • Current progress toward the final goal and future progress plan
    [Check before submission]

    Final Report

    Demonstration [Running demonstration of the processor]
    Date and Time: May 31st (Fri) 13:15-16:30
    Students will give a presentation (sales talk) on the features of the microcomputer they have built and demonstrate the execution of an application program on the microcomputer.
    Report [Documentation on the processor you have built]
    Submission Deadline: June 7th (Fri) 13:15
    Submission Method: Submit the report by creating a release for the tag name (Tag version) called final in the repository of 2024-simple-team[team number] in GitHub Classroom. The assignment is considered submitted when the release is created. To resubmit, you must create a new release with a suffix number such as final-1.

    Materials to be Submitted: Report as indicated below and design data of the completed processor. (All project files required for synthesis should be included in the repository.)
    Content of the Report: Summarize the following information about the completed processor. Each document should have a cover page. The cover page should indicate the name of the document, the student number and name, and the date of submission, etc. Create a directory named report_final at the top of the repository, and place each report document (PDF format only) in the directory with the file names shown in blue below.
    1. [1 copy per group] User's Manual for the Final Deliverables (File name: user_manual.pdf)
      • Refers to an instruction manual, reference manual, or data book.
      • Assuming that the processor is to be made available as an IP core (soft-core processor), the necessary and sufficient information for the use of the processor must be described.
      • Overview, performance and features, instruction set architecture, structure and operation, etc.
      • Make this a complete document by itself (without having to refer to SIMPLE/B).
    2. [1 copy per group] Architecture Extension Specifications (File name: extended_spec.pdf)
      • Description of the extended specifications based on the SIMPLE/B basic architecture
        • What extensions have been made?
        • Explain so that extended specifications and functions can be understood from this document alone.
      • Explain the benefit from those extensions.
        • What new thigs will it be able to do? (It is also advisable to explain it with sample codes, etc)
    3. [1 copy per group] Performance Evaluation Report (File name: evaluation_report.pdf)
      • Evaluate and report on the final deliverables, the processor, of this exercise with respect to each of the performance metrics. Also report on how each metric has changed (and to what extent it has been improved) with the extended specifications implemented.
        • Circuit area: Number of gates (number of LUTs, total/per component)
        • Clock frequency: (estimate value for actual operation/CAD), critical path
        • Application program performance: Number of program instructions/number of execution instructions/number of execution cycles.
      • Reflect on the results of the evaluation. Discuss the degree of achievement for the design goals set for the architecture study at the time of the mid-term report, the degree of achievement for performance and cost estimation, and guidelines for further improvements.
    4. [1 copy per person] Functional Design Specifications (File name: function_status-[student number].pdf)
      • Functional design specifications for the components for which you are responsible for designing (When additional components have been added since the mid-term report)
      • Performance evaluation of the major component for which you are responsible for designing (number of LUTs, delay (CAD estimate), critical path, etc.)
      • Considerations and impressions
        • Discuss the design as a whole, and particularly detailed discussion of the parts for which you are responsible for.
        • Describe the findings and impressions gained through this experiment.
    5. [1 copy per group] Implementation Report (File name: implementation_report.pdf)
      • How far the architectural design goals discussed in the mid-term report have been achieved? If any changes were made to the goals and plans, what were the circumstances and intentions behind the changes?
      • Division of labor: How each group member divided the design of each block that makes up the processor?
      • Include the tag name of the repository for 2024-simple-team[team number] in GitHub Classroom for the final design data.

    [Check before submission] List of Final Report Checkpoints for TA (txt format, UTF-8)
    Also check “Cautionary Points for Design Data Submission.” If any of the ◎ items are not satisfied, you may be instructed to resubmit the design data (especially common are cases where there are no time constraints set or where there are timing violations).

    Resources

    Minimize printing to conserve natural resources and get used to reading online for the sake of the future.

    How to Proceed with Hardware Design

    Circuit Design Description in Verilog HDL
    Introduces typical HDL and explains the basic syntax in Verilog HDL.
    Design Flow Using CAD Tools (Project 3HW)
    Explains the design flow of Quartus Prime, including how to use it in HDL design and how to execute it on actual machines.
    A hands-on Quartus project is published on GitHub as an example of correct data. Refer to it as needed.
    Setting and Verifying Timing Constraints
    An explanatory handout for time constraints and the usage of TimeQuest Timing Analyzer, a supplementary course offered in AY2019. It may be updated and offered again this year.
    AY2019 Second Semester Project 2HW “Logic Design on CAD Tools”
    For those who forgot everything during spring vacation...

    SIMPLE

    SIMPLE Design Resources (ver 4.0: 20200415)
    Describes the basic specifications and principles of SIMPLE, which is the architecture of the processor you will design.
    Implementation of the SIMPLE Architecture Processor
    The instruction set and basic implementation of the SIMPLE architecture are explained using diagrams. In addition, hints are given for the design process.

    simple_tools

    This is a collection of tools that may be useful for the processor design exercise. Updated as needed?
    It is publicly available on GitHub under the MIT License. Issues and pull requests are welcome within the scope of the basic instruction set.

    simple_sample
    This is a collection of sample programs written in SIMPLE basic instructions. It contains a variety of programs, so use it in accordance with your progress in the project.
    simple_assembler
    This is a SIMPLE instruction code assembler written in Python.
    simple_simulator
    This is an instruction level simulator for SIMPLE written in Java. Allows you to verify the functionality of assembly description code. An assembler function is also included in the package.

    Tips for Designing

    This document can be used as a reference for designing in CAD, so pay attention to it as well.

    Frequently Asked Questions and Answers
    In short, this is FAQ. If you have any difficulties, take a look. Additional information is added as needed.
    HDL Handbook
    This is a collection of FAQs and things to pay special attention to in HDL design. Additional information is added as needed.
    How to Create RAM for Main Memory
    This describes a way to create the main memory for the processor using megafunction. It is essential for SIMPLE design.
    Hints for Designing
    These are design hints that include somewhat advanced information. You do not have to force yourself to use them if you do not understand them.
    Synchronous Design
    Tips for synchronous design. (It describes experimental equipment different from the current equipment, and for reference only.
    Logic Gates Required to Configure the Processor
    Gates you need to know at very minimum and their truth tables. (This should be common knowledge for those who have taken Logical Systems.)
    Circuits Required to Configure the Processor
    Lists the basic circuits. (This should be common knowledge for those who have taken Logical Systems.)
    Mid-term Lecture Materials
    Specifies the design problems that were frequently observed when the mid-term report was submitted.

    FPGA Board

    There are the instruction manuals (in Japanese) for PowerMedusa MU500-RX/RK, an FPGA board from Mitsubishi Electric Micro-Computer Application Software Co., Ltd.
    The FPGA on the board is Altera's Cyclone IV family, EP4CE30F23I7N.
    (RX210 microcontroller is also equipped, but not used in this project. If you are interested, you can try experimenting with it.)

    Each of these materials is listed on PandA.

    MU500-RX Set_User's Manual Ver1.1.pdf
    Instruction manual for PowerMedusa board MU500-RX/RK (in Japanese)
    MU500-RX_Pin-Assignment_Table.xls
    Pin assignment table for PowerMedusa board MU500-RX/RK
    MU500-7SEG Manual Ver2.pdf
    Instruction manual for the 7-SEG LED board attached to PowerMedusa board MU500-RX/RK (in Japanese)
    RX_7SEG Pin Assignment for Manual.xls
    Pin assignment table for 7-SEG LED board attached to PowerMedusa board MU500-RX/RK

    CAD and FPGA

    For CAD, Intel PSG (formerly Altera) Quartus Prime 20.1 is used. Note that the information on the Internet is often unreliable due to differences in versions.
    The FPGA used is Cyclone IV EP4CE30F23I7N from Altera.

    Quartus Prime Download Center
    This is the download page for the Lite Edition of Quartus Prime 20.1, which is the tool used in this project. (Standard Edition is installed in the laboratory.)
    Online Resources: Intel FPGA Development Tools Support
    This is the online document for Intel Quartus Prime. This document is basically about the latest versions of Intel Quartus Prime tools, and be aware that some of the explanations may not make any sense if the version is different. You may find it difficult to navigate through so many resources, but reading the following intensively may be helpful:
    • Quartus Prime Standard Edition Handbook
      There are three volumes, each in a separate file, but the useful chapters for the details of this experiment are shown below:
      • Volume 1, Chapter 17: Optimizing the Design Netlist
      • Volume 2, Chapter 1: Constraining Designs
      • Volume 2, Chapter 10: Design Optimization Overview
      • Volume 2, Chapter 12: Timing Closure and Optimization
      • Volume 2, Chapter 13: Power Optimization
      • Volume 2, Chapter 14: Area Optimization
      • Volume 3, Chapter 8: The Intel Quartus Prime Timing Analyzer
      • (Volume 1, Chapter 3: Intel Quartus Prime Incremental Compilation for Hierarchical and Team-Based Design.
      • (Volume 2, Chapter 2: Managing Device I/O pins)
    • Timing Analyzer Quick Start Tutorial
    • Simulation Quick-Start for ModelSim-Intel FPGA Edition (Intel Quartus Prime Standard Edition)
    Cyclone Legacy FPGAs Support
    Handbooks and datasheets for the Cyclone device family are available.
    Intel Community Forums
    This is a so-called Q&A site, and the “FPGA Developers” category is applicable. You might as well ask the whole world in English.

    References

    • 富田眞治,中島浩『コンピュータハードウェア』(昭晃堂) ISBN:4785620447
    • D.A.Patterson and J.L.Hennessy, "Computer Organization and Design, Fifth Edition" (Morgan Kaufmann) ISBN:9780124077263
    • 小林優『入門Verilog HDL記述―ハードウェア記述言語の速習&実践』(CQ出版) ISBN:4789833984
    • 深山正幸『HDLによるVLSI設計―VerilogHDLとVHDLによるCPU設計』(共立出版) ISBN:4320120272

    Link


    Contact: le3hw@kuis.kyoto-u.ac.jp
    このコンテンツは,最初に嶋田創先生が作成され,高木一義先生,高瀬英希先生が更新されたものをベースにしています.
    ここに感謝の意を表します.