컴퓨터구조 3

#8 MIPS Pipeline Processor Design (6) - Simulation, 결론

3. Simulation 시뮬레이션을 통해 해당 프로세서의 작동을 검증하고 확인한다. 3.1. Mips Top module simulation 설계한 Mips 5stage pipline processor가 제대로 작동되는지 확인하기 위한 명령어 예제로 1.2.3 Instruction Memory 에 적혀있는 예제 코드를 활용한다 사용한 테스트 벤치 `timescale 1ns / 1ps module MIPS_tb(); reg clk, rst; wire [31:0] ProgramCounter_Output, t0, t1, t2, t3, t4, t5, t6, t7; wire [31:0] mem8, mem9, mem10, mem11, mem12, mem13, mem14, mem15; wire [1:0] forwa..

#7 MIPS Pipeline Processor Design (5) - I/O, Constraints

2. Verilog를 이용한 I/O 설계 2.1 7 Segment LED 7 segment LED를 이용하여 Program Counter의 값을 Hexadecimal 형식으로 출력하였다. 코드는 수업에서 제공된 코드를 이용하였다. Instantiation은 다음과 같다. ss_drive SSEG ( .clk(clk), .rst(rst), .data7(PC[31:28]), .data6(PC[27:24]), .data5(PC[23:20]), .data4(PC[19:16]), .data3(PC[15:12]), .data2(PC[11:8]), .data1(PC[7:4]), .data0(PC[3:0]), .mask(8'b11111111), .ssA(CA), .ssB(CB), .ssC(CC), .ssD(CD), ...

#6 MIPS Pipeline Processor Design (4) - Hazard, Top module

1.9 Forwarding Unit Forwarding Unit 동작 설명 Forwarding Unit은 데이터 하자드를 해결하는 데 사용되는 유닛이다. Forwarding이 필요한 조건은 다음과 같다: 1. EX/MEM.RegisterRd가 ID/EX.RegisterRs와 같은 경우 2. EX/MEM.RegisterRd가 ID/EX.RegisterRt와 같은 경우 3. MEM/WB.RegisterRd가 ID/EX.RegisterRs와 같은 경우 4. MEM/WB.RegisterRd가 ID/EX.RegisterRt와 같은 경우 1과 2의 경우, 데이터를 가져오기 위해 EX/MEM 파이프라인 레지스터로부터 Forwarding이 필요하며, 3과 4의 경우, MEM/WB 파이프라인 레지스터로부터 Forward..