Original German, Korean translation, method, source-grounded solution, recall-answer audit, wrong-answer explanations, active recall, and source citations are separated below.
No active weak-topic rows currently map to this Aufgabe.
Subproblem learning view
소문제별 1타 강사식 풀이 교실
문제를 읽은 직후 필요한 개념을 직관적으로 잡고, 같은 순서로 손풀이를 재현하도록 구성했습니다.
Teilaufgabe
6a
11 points
Original German
Recalled German
In dieser Aufgabe betrachten Sie den Mehrtakt-Prozessor. Als Hilfestellung sind das Schaltbild des Prozessors und die Wahrheitstabelle des ALU-Decoders abgebildet.
Erweitern Sie die FSM des Prozessors um eine neue Instruktion, jalm rd, imm(rs1) (Jump and Link Memory). Es handelt sich um eine I-Typ-Instruktion analog zu lw (Load Word) mit dem Opcode 0001011.
Diese soll PC+4 berechnen (JALM), in das Zielregister rd ablegen (JALMAdr), die Speicheradresse rs1 + imm berechnen (JALMAdr) und an den Speicher anlegen (JALMRead) und schliesslich den PC zum gelesenen Sprungziel setzen (JALMJump).
Die Instruktion soll, auf S1: Decode folgend, mit den neuen Zustaenden in der gegebenen Reihenfolge implementiert werden: JALM, JALMAdr, JALMRead und JALMJump. Orientieren Sie sich bei der Umsetzung an jal und lw. Verwenden Sie die ResultSrc-Werte 00 und 01. Zeichnen Sie die neuen Zustaende und deren Ausgabewerte in das Zustandsdiagramm ein.
Mehrtakt-Prozessor FSM에 비표준 명령 jalm rd, imm(rs1)을 추가하라. PC+4를 rd에 저장하고, rs1+imm 주소에서 읽은 값을 새 PC로 사용하는 state와 control signal을 작성하라.
한 줄 핵심
JALM은 jal의 link 저장과 lw의 address/memory-read 흐름을 결합한다. 각 FSM state 사이에 보존되는 register 값을 추적한다.
0. 초보자 개념 다리
JALM은 돌아올 주소를 메모하고, 계산한 주소의 표지판을 읽어 그곳으로 이동하는 작업이다.
1. 이 문제의 풀이 루틴
rd←PC+4, addr←rs1+imm, PC←Mem[addr]로 쪼갠다.
state 사이에 보존되는 OldPC·A·ImmExt를 확인한다.
ALUOut에 address를 저장한다.
memory read와 PC update state/control을 적는다.
link write와 PC update 시점을 검산한다.
2. 왜 이 방법이 맞을까?
Mehrtakt datapath는 중간 register로 한 state의 결과를 다음 state까지 보존한다.
3. 시험장 실수 방지
memory data가 안정되기 전 같은 cycle에 PC에 쓴다고 가정하지 않는다.
최대 상세 해설 · 6a 깊이 학습: `jalm` 의미를 Mehrtakt-FSM 네 state로 옮기기
이 강의의 도착점
비표준 I-Typ 명령 jalm rd,imm(rs1)의 의미를 link, memory address, memory data, new PC의 네 값으로 분해하고, 회상 문제에 지정된 JALM → JALMAdr → JALMRead → JALMJump 순서에 맞춰 각 state의 control signal과 보존 값을 설명한다.
0. 정말 아무것도 모른다면 여기서 시작
이 문제는 둥근 state 네 개를 외우는 문제가 아니다. 먼저 명령의 결과를 두 줄로 쓴다: R[rd] ← PC_old+4, PC ← Mem[R[rs1]+SignExt(imm)]. 첫 줄은 jal의 link 동작, 둘째 줄은 lw의 주소 계산·memory read 뒤 PC 갱신 동작이다.
Mehrtakt-Prozessor에는 ALU가 하나이므로 PC+4와 rs1+imm를 한 순간에 같은 ALU로 만들 수 없다. 각 cycle 끝에 ALUOut, Data/MDR 같은 register에 중간값을 저장하고 다음 state가 그 값을 소비한다.
특히 JALMAdr은 두 일을 동시에 한다. 이전 state가 남긴 old ALUOut=PC+4를 rd에 쓰는 동안, ALU는 새 값 rs1+imm를 계산해 cycle 끝에 ALUOut을 갱신한다.
SoSe25 자료는 공식 Klausur나 공식 Lösung이 아니라 Gedächtnisprotokoll이다. 아래 state 이름·순서·signal 값은 회상 원문과 내려받은 FSM 그림, 현행 Übung 7–8 및 Vorlesung으로 대조한 학습용 재구성이며, 당시 공식 채점 도식의 정확한 선 위치나 배점 기준은 확인되지 않았다.
1. 문제에 나오는 말부터 하나씩
jalm rd,imm(rs1)
이 회상 문제에서만 정의한 비표준 RISC-V I-Typ 명령. link PC_old+4를 rd에 쓰고, Mem[rs1+imm]를 새 PC로 사용한다.
Mehrtakt-Prozessor
한 instruction의 일을 여러 Takte로 나누고 ALU, memory 같은 hardware를 state마다 재사용하는 processor.
FSM
현재 state와 opcode에 따라 다음 state와 control outputs를 정하는 Steuerwerk. 이 문제에서는 Decode 뒤 opcode 0001011이 새 경로를 선택한다.
OldPC
Fetch 때 instruction 자신의 원래 PC를 보존한 register. 이미 PC가 PC+4로 바뀐 뒤에도 올바른 link를 계산하는 기준이다.
ALUOut
한 cycle의 ALU 결과를 다음 cycle까지 보존하는 register. 여기서는 먼저 link, 다음에는 memory effective address를 담는다.
Data / MDR
memory에서 읽은 값을 다음 state까지 보존하는 register. jalm에서는 최종 jump target을 담는다.
ResultSrc
공통 Result 경로의 source를 고르는 mux control. 회상 그림에서 00은 ALUOut, 01은 memory의 Data/MDR를 선택한다.
AdrSrc
공유 memory의 address source를 고르는 control. JALMRead의 1은 PC가 아니라 data-address 경로를 사용하게 한다.
PCUpdate
FSM이 unconditional PC write를 요청하는 output. 현행 자료의 관계 PCWrite=(Branch AND Zero) OR PCUpdate에서 jalm은 Branch가 아니라 PCUpdate를 사용한다.
RegWrite
Register File의 rd 쓰기를 허용하는 control. link가 old ALUOut에 준비된 JALMAdr에서만 1이다.
2. 선생님과 같이 한 칸씩 푸는 과정
첫 줄에 semantic target을 적는다: link=PC_old+4, addr=R[rs1]+SignExt(imm), target=Mem[addr], R[rd]=link, PC=target.
정상 Fetch와 Decode 뒤 이미 무엇이 있는지 적는다. OldPC=PC_old, Instr=jalm, A=R[rs1], ImmExt=SignExt(imm)이다. 새 state는 이 보존값에서 시작한다.
JALM에서는 ALU A에 OldPC, B에 constant 4를 넣고 add한다. 따라서 ALUSrcA=01, ALUSrcB=10, ALUOp=00이고 cycle 끝에 ALUOut=PC_old+4가 된다.
JALMAdr 시작 시 old ALUOut에는 link가 있다. ResultSrc=00, RegWrite=1로 그 link를 rd에 쓰고, 동시에 ALU A=A=R[rs1], B=ImmExt로 rs1+imm를 계산한다. 그래서 ALUSrcA=10, ALUSrcB=01, ALUOp=00도 같은 state에 필요하다.
JALMAdr clock edge 뒤에는 두 결과가 성립한다: R[rd]=PC_old+4, 새 ALUOut=R[rs1]+imm. old와 new ALUOut을 시간상 구분하는 것이 핵심이다.
JALMRead에서는 ResultSrc=00으로 current ALUOut=addr를 Result 경로에 내고 AdrSrc=1로 data memory address에 사용한다. memory word는 cycle 끝에 Data/MDR=Mem[addr]로 보존된다.
JALMJump에서는 address가 아니라 방금 읽은 memory data가 필요하다. ResultSrc=01로 Data/MDR를 선택하고 PCUpdate=1로 PC←target을 수행한다.
transition을 완성한다: S1 Decode --op=0001011→ JALM → JALMAdr → JALMRead → JALMJump → S0 Fetch. state 번호 S10–S13은 회상된 도식의 연속 번호이며 핵심은 이름·순서·출력이다.
마지막으로 default를 검사한다. MemWrite=0은 모든 새 state에서 유지되고, RegWrite는 JALMAdr만, PCUpdate는 JALMJump만 1이어야 한다. 조건 분기가 아니므로 Branch=0이다.
세 값을 일부러 구분해 읽는다: rd는 PC+4, memory address는 rs1+imm, PC는 Mem[rs1+imm]를 받는다. 이 셋 중 두 개라도 같게 썼다면 처음 틀린 state로 돌아간다.
모든 새 state에서 MemWrite=0; RegWrite는 JALMAdr에서만, PCUpdate는 JALMJump에서만 assert한다. 이는 공식 SoSe25 Musterlösung의 전사가 아니라 Gedächtnisprotokoll의 state/signal 회상을 로컬 그림과 현행 강의·Übung으로 검증한 학습용 답이며, 당시 공식 도식의 정확한 overlay와 채점 표시는 확인되지 않았다.
4. 이제 정확한 개념으로 한 단계 더 깊게
Mehrtakt 설계의 첫 원칙은 한 ALU job을 한 state에 배정하는 것이다. PC+4와 rs1+imm는 서로 다른 state에서 계산되어야 한다.
state 사이 값은 이름이 아니라 register로 생존한다. JALM의 combinational ALUResult는 clock edge에서 ALUOut에 들어가야 다음 state의 ResultSrc=00 경로가 사용할 수 있다.
JALMAdr의 동시성은 모순이 아니다. cycle 동안 Register File은 clock edge 전 old ALUOut을 write data로 보고, ALUOut register는 같은 edge에서 새 address를 받는다.
memory address와 memory contents는 다른 값이다. ALUOut=rs1+imm은 어디서 읽을지를 말하고, Data/MDR=Mem[ALUOut]은 실제 jump target이다.
ResultSrc 숫자는 이 회상 그림의 mux label과 함께 해석해야 한다. 다른 강의 버전의 encoding을 무조건 이 문제에 이식하지 말고 00=ALUOut, 01=Data/MDR라는 그림 의미를 쓴다.
PCUpdate는 unconditional update 요청이고 Branch는 compare 결과 Zero와 결합된다. jalm은 조건 비교가 없으므로 Branch를 assert하면 안 된다.
Fetch가 이미 PC를 순차 주소로 갱신했기 때문에 link 계산에는 보존된 OldPC가 필요하다. 현재 PC를 또 +4하면 instruction 기준으로 잘못된 link가 될 수 있다.
비표준 opcode 0001011과 instruction 이름 jalm은 이 회상 과제의 정의다. 표준 RV32I 명령처럼 외부 ISA 사실로 일반화하지 않는다.
5. 시험장에서 그대로 쓰는 단계별 풀이
문제지 여백에 rd←PC_old+4, PC←Mem[rs1+imm] 두 architectural update를 먼저 적는다.
그 아래 link, addr, target 세 상자를 만들고 각각 어느 register에서 다음 state까지 살아야 하는지 ALUOut, ALUOut, Data/MDR라고 적는다.
각 state에 정확히 하나의 주 생산값을 배치한다: JALM=link, JALMAdr=address, JALMRead=target, JALMJump=PC update.
ALU를 쓰는 두 state부터 mux input을 역으로 찾는다. OldPC+4와 A+ImmExt가 각각 어떤 ALUSrc 값인지 회상 그림의 label로 확인한다.
소비되는 old register 값에 output control을 붙인다. JALMAdr에는 old ALUOut writeback, JALMRead에는 ALUOut memory address, JALMJump에는 Data/MDR PC input을 붙인다.
side effect enable을 별도 색으로 표시한다: RegWrite는 JALMAdr, PCUpdate는 JALMJump, MemWrite는 없음.
Decode의 opcode transition과 마지막 Fetch return 화살표를 그린다.
마지막 검산 문장을 소리 내어 읽는다: rd=link, address=base+offset, PC=memory contents.
6. 예시와 변형 문제 연결
PC_old=0x1000, R[rs1]=0x2000, imm=0x10, Mem[0x2010]=0x5000이면 JALM 뒤 ALUOut=0x1004; JALMAdr 뒤 rd=0x1004, ALUOut=0x2010; JALMRead 뒤 Data=0x5000; JALMJump 뒤 PC=0x5000이다.
JALM state에 RegWrite=1을 넣으면 그 cycle 시작의 ALUOut은 아직 PC+4라고 보장되지 않는다. 따라서 unrelated old ALUOut을 rd에 쓸 수 있다. link 생성 state와 link writeback state를 한 cycle 차이로 둬야 한다.
jm imm(rs1)처럼 같은 indirect memory jump지만 rd link가 없는 변형이라면 link writeback의 RegWrite는 필요 없다. 다만 이 변형의 정확한 state 수는 주어진 datapath·문제 조건에 따라 설계해야 하며 SoSe25 jalm 정답으로 섞으면 안 된다.
ResultSrc=00으로 JALMJump를 수행하면 PC는 memory contents가 아니라 address rs1+imm를 받을 수 있다. 숫자 예에서 잘못된 PC는 0x2010, 올바른 PC는 0x5000이다.
7. 독일어 만점 답안 템플릿
Ausgehend von S1: Decode führt op=0001011 in die Folge JALM → JALMAdr → JALMRead → JALMJump. In JALM berechnet die ALU mit ALUSrcA=01, ALUSrcB=10, ALUOp=00 den Link OldPC+4 und speichert ihn in ALUOut. In JALMAdr wird der alte ALUOut mit ResultSrc=00, RegWrite=1 nach rd geschrieben, während ALUSrcA=10, ALUSrcB=01, ALUOp=00 die Adresse rs1+imm neu in ALUOut erzeugt. JALMRead liest mit ResultSrc=00, AdrSrc=1 den Speicher, und JALMJump setzt mit ResultSrc=01, PCUpdate=1 den PC auf den gelesenen Wert. MemWrite bleibt 0. Die exakte offizielle SoSe25-Zeichnung ist nicht verfügbar; dies ist die gegen aktuelle Unterlagen geprüfte Recall-Rekonstruktion.
8. 자주 나오는 오답과 교정
JALM에서 즉시 RegWrite=1 하기: 이 state가 끝나야 PC+4가 ALUOut에 저장되므로 아직 link writeback source가 준비되지 않았다.
JALMAdr에서 rd만 쓰고 rs1+imm를 계산하지 않기: 다음 JALMRead가 사용할 address가 ALUOut에 없다.
JALMRead에서 PC까지 바로 갱신하기: memory read value는 먼저 Data/MDR에 잡히고 다음 state가 소비한다.
JALMJump에 ResultSrc=00 쓰기: PC가 memory contents가 아니라 memory address를 받을 수 있다.
unconditional jump에 Branch=1 쓰기: jalm은 Zero 비교가 없고 PCUpdate를 사용한다.
rd←Mem[rs1+imm]라고 쓰기: memory data는 rd가 아니라 PC로 가고 rd에는 PC+4가 간다.
state 번호·선 위치를 공식 원본처럼 단정하기: 회상 asset과 현행 자료로 signal 의미는 대조했지만 공식 Klausur/Musterlösung은 없다.
9. 답을 보지 않고 확인하기
jalm이 architectural state에 만드는 두 최종 update를 식으로 쓰라.
JALM state가 끝난 직후 ALUOut에는 무엇이 있는가?
JALMAdr가 같은 cycle에 수행하는 두 동작은 무엇인가?
JALMRead에서 AdrSrc=1과 ResultSrc=00이 필요한 이유는 무엇인가?
JALMJump에서 Branch가 아니라 PCUpdate를 쓰는 이유는 무엇인가?
이 가이드에서 공식적으로 확인되지 않았다고 명시한 범위는 무엇인가?
확인문제 정답 보기
R[rd]←PC_old+4와 PC←Mem[R[rs1]+SignExt(imm)]이다.
ALUOut=OldPC+4, 즉 jalm instruction 다음 순차 주소인 link가 있다.
old ALUOut=PC_old+4를 rd에 쓰고, ALU로 A+ImmExt=rs1+imm를 계산해 new ALUOut에 저장한다.
ResultSrc=00이 ALUOut의 effective address를 Result 경로에 내고 AdrSrc=1이 그것을 data memory address로 선택하게 한다.
jalm은 비교 결과에 의존하지 않는 unconditional jump다. 현행 식에서 PCWrite=(Branch AND Zero) OR PCUpdate이므로 PCUpdate=1을 사용한다.
공식 SoSe25 시험지·Musterlösung의 정확한 FSM overlay, state 표시 방식과 채점 기준이다. 제공 답은 회상 원문·asset과 현행 자료를 대조한 재구성이다.
Interactive practice
JALM FSM state stepper
state를 이동하며 control signal과 보존되는 값을 확인하세요.
Teilaufgabe
6b
3 points
Original German
Recalled German
In dieser Aufgabe betrachten Sie den Mehrtakt-Prozessor. Als Hilfestellung sind das Schaltbild des Prozessors und die Wahrheitstabelle des ALU-Decoders abgebildet.
Betrachten Sie die eingezeichneten Pfade vom Instr-Register zum ALUOut-Register. Berechnen Sie den laengsten Pfad T_C und geben Sie dazu die Formel an, sodass die einzelnen genutzten Parameter einsichtlich sind. Die Verzoegerungszeiten der Elemente sind in der Tabelle gelistet.
The source contains a few spelling and encoding artifacts, for example erg채nzen, schließlich, and Lösung. The normalized terms are ergänzen, schließlich, and Lösung. The instruction itself is non-standard RISC-V for this exam task: jalm rd, imm(rs1) with opcode 0001011.
한국어 문제
Instr register에서 ALUOut register까지 표시된 경로의 critical-path delay T_C를 각 component delay의 식과 함께 계산하라.
한 줄 핵심
critical path에 실제로 직렬 연결된 component delay와 register t_pcq/t_setup만 더하고 병렬 경로는 중복 합산하지 않는다.
0. 초보자 개념 다리
critical path는 출발 register에서 도착 register까지 이어진 가장 오래 걸리는 한 줄의 도로다.
1. 이 문제의 풀이 루틴
출발 register t_pcq를 적는다.
실제 직렬 combinational component만 나열한다.
선택된 mux와 ALU delay를 합한다.
도착 register t_setup을 더한다.
병렬/미사용 경로를 뺀다.
2. 왜 이 방법이 맞을까?
clock edge 사이에 데이터가 출발해 다음 register setup 전에 안정돼야 한다.
3. 시험장 실수 방지
t_pcq·t_setup 누락과 병렬 경로 중복 합산을 조심한다.
최대 상세 해설 · 6b 깊이 학습: Instr-register에서 ALUOut-register까지 kritischer Pfad 계산
이 강의의 도착점
회상 그림에 표시된 register-to-register 경로에서 시작 clk-to-Q, 사용된 logic delay, 끝 setup을 빠짐없이 골라 symbolic formula와 ps 합계를 작성하고, 300 ps가 적용되는 범위를 명시한다.
0. 정말 아무것도 모른다면 여기서 시작
Kritischer Pfad는 그림에서 선이 가장 길어 보이는 길이가 아니다. 한 state element의 출력이 clock edge 뒤 유효해진 시점부터, 조합회로를 지나 다음 state element가 setup 조건을 만족해야 하는 시점까지의 시간 합이다.
이 소문제의 시작은 Instr register이고 끝은 ALUOut register다. 따라서 식의 맨 앞에는 source register의 t_pcq, 맨 뒤에는 destination register의 t_setup이 반드시 들어간다.
회상 asset에서 채점 대상으로 표시된 경로와 표는 t_pcq, t_dec, t_ext, t_mux, t_ALU, t_setup을 사용하며 각각 40, 25, 35, 30, 120, 50 ps다. memory read나 AND-OR gate는 이 표시 경로에 포함되지 않는다.
SoSe25 원문과 solution은 Gedächtnisprotokoll이라 공식 자료가 아니다. 300 ps는 내려받은 highlighted recall path와 delay table, 현행 강의의 timing 원칙에 대해 확인된 값이다. decoder와 extender를 병렬로 모델링하는 다른 physical implementation 전체에 보편적으로 적용되는 수치라고 단정하지 않는다.
1. 문제에 나오는 말부터 하나씩
kritischer Pfad
한 clock period 안에 완료되어야 하는 register-to-register 경로 중 허용 시간을 가장 크게 요구하는 경로.
t_pcq
clock edge 뒤 source register의 Q output이 유효해질 때까지의 clk-to-Q delay. 여기서는 40 ps.
t_dec
Control/Decoder가 instruction field에서 control 값을 만드는 delay. 회상 표에서는 25 ps.
t_ext
immediate field를 확장하는 Extend Unit delay. 회상 표에서는 35 ps.
t_mux
선택 signal에 따라 ALU input을 고르는 Multiplexer delay. 회상 표에서는 30 ps.
t_ALU
ALU가 선택된 operand로 결과를 만드는 delay. 회상 표에서는 120 ps.
t_setup
다음 clock edge 전에 destination register input이 안정되어 있어야 하는 setup time. 여기서는 50 ps.
T_C
이 문제에서 요구한 최소 clock period를 나타내는 기호. 각 delay를 같은 단위 ps로 더한다.
2. 선생님과 같이 한 칸씩 푸는 과정
표에서 숫자를 먼저 더하지 말고 path의 시작과 끝에 동그라미를 친다: source=Instr register, destination=ALUOut register.
source register가 clock edge에서 즉시 값을 내지 않으므로 첫 항 t_pcq=40 ps를 적는다.
회상 그림에 표시된 instruction-driven logic contribution을 따라 t_dec=25 ps와 t_ext=35 ps를 적는다. 이 두 항을 포함하는 것은 이 reconstructed item의 marked/expected path 기준이다.
ALU input 앞에 Multiplexer가 있으므로 t_mux=30 ps를 더한다.
선택된 operand가 ALU를 통과하므로 가장 큰 조합 delay t_ALU=120 ps를 더한다.
결과가 ALUOut register에 안전하게 잡히려면 next edge 전 setup이 필요하므로 마지막에 t_setup=50 ps를 적는다.
symbolic formula를 먼저 완성한다: T_C=t_pcq+t_dec+t_ext+t_mux+t_ALU+t_setup.
숫자를 같은 순서로 대입해 40+25+35+30+120+50=300 ps를 얻고, ps 단위를 끝에 쓴다.
제외 항목을 검산한다. 표시된 경로는 Data Memory를 지나지 않으므로 t_mem=200 ps를 넣지 않고, PCWrite의 AND-OR gate도 ALUOut data path가 아니므로 넣지 않는다.
답 끝에 범위를 한 문장으로 붙인다: 300 ps는 회상 그림에서 표시된 path와 제공 delay table의 expected sum이며, 당시 공식 SoSe25 채점표는 확인되지 않았다.
3. 그래서 정답은 무엇인가?
회상 asset에 표시된 Instr-register → ALUOut-register 경로의 expected 계산은 다음과 같다.
t_pcq와 t_setup은 register-to-register timing의 양 끝이므로 포함한다. 표시 경로에 없는 t_mem=200 ps와 t_AND-OR=20 ps는 넣지 않는다. 300 ps는 로컬 회상 그림의 highlighted path와 delay table에 대해 검증된 reconstructed answer이며, 공식 SoSe25 Klausur/Musterlösung의 채점값이나 모든 multicycle implementation의 보편적 critical path라고 단정할 수는 없다.
4. 이제 정확한 개념으로 한 단계 더 깊게
동기식 timing 식의 기본 골격은 Tclock ≥ t_pcq + t_comb,max + t_setup이다. source와 destination register timing을 조합회로 delay 바깥에 붙인다.
path 식은 회로 블록 목록이 아니라 실제로 신호가 거치는 블록 목록이다. 표에 memory delay가 있다고 해서 모든 식에 memory를 더하지 않는다.
symbolic formula를 먼저 쓰면 누락을 발견하기 쉽고, 채점자도 어떤 path를 선택했는지 볼 수 있다. 숫자만 300이라고 쓰는 것보다 partial credit에 강하다.
단위는 모두 ps이므로 그대로 합할 수 있다. GHz로 바꾸라는 질문이 아니므로 역수를 계산할 필요가 없다.
critical path 문제에서는 source register의 setup이나 destination register의 clk-to-Q를 넣는 것이 아니다. 흐름 방향에 따라 source=clk-to-Q, destination=setup이다.
회상 그림의 expected sum은 decoder와 extender 항을 모두 포함한다. 실제 회로에서 parallel arrival를 max로 결합하는 정밀 timing 모델은 별도 설계 문제이며, 주어진 reconstructed exam path의 채점식과 구분한다.
300 ps가 이 특정 경로의 delay라는 것과 processor 전체 clock period를 확정한다는 것은 다르다. 전체 datapath의 다른 register-to-register 경로가 더 길다면 전역 critical path는 달라질 수 있다.
5. 시험장에서 그대로 쓰는 단계별 풀이
문제의 화살표가 시작하는 register와 끝나는 register 이름을 답안 첫 줄에 쓴다.
delay table에서 t_pcq와 t_setup을 먼저 체크한다.
표시 선을 한 블록씩 따라가며 Decoder, Extend, mux, ALU를 체크하고 나머지 표 항목은 취소선으로 제외한다.
숫자 없이 symbolic sum을 작성한다.
각 symbol 바로 아래에 표의 ps 값을 같은 순서로 대입한다.
부분합을 계산한다: 40+25+35=100, 30+120+50=200, 총 300 ps로 검산한다.
memory와 AND-OR gate가 왜 빠졌는지 path 그림과 대조한다.
공식 자료가 아닌 recall path에 대한 결과라는 한계를 마지막 문장에 명시한다.
6. 예시와 변형 문제 연결
source가 Instr, destination이 ALUOut인 이 경로에서는 40+25+35+30+120+50=300 ps다. 시작·끝 register timing을 빼면 210 ps가 되는데, 이는 완전한 register-to-register clock constraint가 아니다.
학생이 표의 모든 항을 더하면 t_AND-OR=20과 t_mem=200까지 포함해 520 ps가 된다. 하지만 표시된 ALUOut 경로는 memory read나 PCWrite AND-OR gate를 지나지 않으므로 이 합은 path selection 오류다.
다른 문제에서 ALUOut→memory→Data register가 표시되었다면 memory read 200 ps가 들어갈 수 있다. 어떤 delay를 쓰는지는 instruction 이름보다 그려진 source-to-destination path가 결정한다.
decoder와 extender가 완전히 병렬인 별도 구현을 정밀 분석할 때는 두 arrival의 최대값을 논할 수 있다. 그러나 SoSe25 회상 solution과 marked asset의 expected 식은 두 항을 포함한 300 ps이며, 두 모델을 섞지 않는다.
7. 독일어 만점 답안 템플릿
Für den markierten Register-zu-Register-Pfad vom Instr-Register zum ALUOut-Register gilt im rekonstruierten Aufgabenbild: T_C=t_pcq+t_dec+t_ext+t_mux+t_ALU+t_setup = 40+25+35+30+120+50 = 300 ps. t_mem und t_AND-OR liegen nicht auf diesem markierten Pfad. Die Zahl 300 ps ist für die Recall-Abbildung und ihre Verzögerungstabelle geprüft; eine offizielle SoSe25-Musterlösung bzw. eine universelle Aussage für andere Implementierungen liegt nicht vor.
8. 자주 나오는 오답과 교정
t_pcq를 빼먹기: source register의 출력은 clock edge 순간 바로 유효하지 않다.
t_setup을 빼먹기: destination ALUOut register가 next edge 전에 안정된 입력을 요구한다.
표에 있다는 이유로 t_mem까지 더하기: 이 highlighted path는 memory를 지나지 않는다.
t_AND-OR를 넣기: PCWrite control logic은 Instr-to-ALUOut data path의 구성 블록이 아니다.
symbol 없이 300만 쓰기: 어떤 delay를 선택했는지와 단위가 보이지 않아 방법 점수를 잃는다.
300 ps를 GHz로 잘못 쓰거나 단위를 생략하기: 문제의 표와 합은 ps 단위다.
300 ps를 모든 구현의 절대값으로 단정하기: 이는 비공식 recall image의 marked path와 expected sum에 한정된 검증값이다.
9. 답을 보지 않고 확인하기
일반적인 register-to-register clock constraint의 세 부분을 식으로 쓰라.
표시된 Instr-to-ALUOut path가 Data Memory의 read 경로를 통과하지 않기 때문이다.
40+25+35=100 ps, 30+120+50=200 ps이므로 합은 300 ps다.
공식 SoSe25 시험·Musterlösung이 아니라 Gedächtnisprotokoll의 highlighted asset과 delay table에 대해 확인된 reconstructed value라는 점이다.
Interactive practice
Critical-path builder
경로에 포함되는 component를 선택해 300 ps를 만드세요.
Intro
Status note: This page is built from an unverified recall reconstruction, not official exam material and not an official solution. The state sequence, control-signal reasoning, memory-target trace, and 300 ps timing claim were checked against current SS26 Uebung/Loesung 7-8, Vorlesung Teil 2, and the hosted recall images downloaded as Aufgabe-specific assets.
full Mehrtakt datapath, main FSM, control values for lw, R-type, I-type, jal
Vorlesung\Rechnerorganisation - Teil 2.pdf
pages 76-78
multicycle CPI and timing with t_pcq, t_setup, t_mux, t_ALU, t_dec, t_ext, t_mem
Uebung\Übung 7.pdf
pages 1-5
Mehrtakt processor steps, active signals, PC+4 already in first step, ResultSrc=10 only for PCWrite
Uebung\Lösung 7.pdf
pages 1-3
official-style trace for beq, sub, jal; jal computes jump target and then link address
Uebung\Lösung 7.pdf
pages 4-6
AdrSrc, ALUSrcB, ResultSrc meanings and effects
Uebung\Übung 8.pdf
pages 1-3
FSM control questions and instruction-extension task style
Uebung\Lösung 8.pdf
pages 1-3
PCWrite=(Branch AND Zero) OR PCUpdate, ALUOp vs ALUControl
Uebung\Lösung 8.pdf
pages 4-6
adding non-standard instructions by opcode transitions after Decode
Original German
Recalled German
In dieser Aufgabe betrachten Sie den Mehrtakt-Prozessor. Als Hilfestellung sind das Schaltbild des Prozessors und die Wahrheitstabelle des ALU-Decoders abgebildet.
Erweitern Sie die FSM des Prozessors um eine neue Instruktion, jalm rd, imm(rs1) (Jump and Link Memory). Es handelt sich um eine I-Typ-Instruktion analog zu lw (Load Word) mit dem Opcode 0001011.
Diese soll PC+4 berechnen (JALM), in das Zielregister rd ablegen (JALMAdr), die Speicheradresse rs1 + imm berechnen (JALMAdr) und an den Speicher anlegen (JALMRead) und schliesslich den PC zum gelesenen Sprungziel setzen (JALMJump).
Die Instruktion soll, auf S1: Decode folgend, mit den neuen Zustaenden in der gegebenen Reihenfolge implementiert werden: JALM, JALMAdr, JALMRead und JALMJump. Orientieren Sie sich bei der Umsetzung an jal und lw. Verwenden Sie die ResultSrc-Werte 00 und 01. Zeichnen Sie die neuen Zustaende und deren Ausgabewerte in das Zustandsdiagramm ein.
Betrachten Sie die eingezeichneten Pfade vom Instr-Register zum ALUOut-Register. Berechnen Sie den laengsten Pfad T_C und geben Sie dazu die Formel an, sodass die einzelnen genutzten Parameter einsichtlich sind. Die Verzoegerungszeiten der Elemente sind in der Tabelle gelistet.
The source contains a few spelling and encoding artifacts, for example erg채nzen, schließlich, and Lösung. The normalized terms are ergänzen, schließlich, and Lösung. The instruction itself is non-standard RISC-V for this exam task: jalm rd, imm(rs1) with opcode 0001011.
Korean Translation
이 문제는 Mehrtakt-Prozessor의 FSM을 새 명령어 하나에 맞게 확장하는 문제다. jalm rd, imm(rs1)는 시험에서 정의한 비표준 I-Typ 명령어이며, 의미는 다음과 같다.
현재 명령어 다음 주소인 PC+4를 계산한다.
그 값을 link 값으로 rd에 저장한다.
rs1 + imm을 계산해서 memory address로 만든다.
그 memory address에서 word를 읽는다.
읽은 값을 새 PC로 넣어서 jump한다.
즉 jalm은 jal처럼 rd <- PC+4를 하고, lw처럼 rs1+imm 주소를 만든 뒤, 그 주소에 저장된 값을 jump target으로 사용한다. 그래서 답안은 jal의 link 저장 흐름과 lw의 address/memory read 흐름을 합쳐야 한다.
Teilaufgabe 6b는 Instr register에서 ALUOut register까지 표시된 경로의 kritischer Pfad를 계산하는 문제다. 각 hardware block의 delay를 더해서 T_C를 ps 단위로 제시해야 한다.
Concept Lesson
Prerequisites
이 문제를 풀려면 네 가지를 먼저 알아야 한다.
Mehrtakt processor에서는 한 instruction이 여러 state를 순서대로 지난다.
state 사이를 넘는 값은 register에 보존된다: OldPC, Instr, A, B, Data/MDR, ALUOut.
ResultSrc는 writeback 또는 PC input으로 들어갈 Result 값을 고른다.
PCUpdate는 FSM의 PC 갱신 요청이고, current Loesung 8은 PCWrite = (Branch AND Zero) OR PCUpdate라고 확인한다.
현재 state에 따라 control signals와 next state를 정하는 Steuerwerk
op=0001011이면 S1: Decode 뒤에 JALM path로 간다
OldPC
Fetch 시점의 원래 PC를 보관
PC+4 link 계산에 필요
A
rs1에서 읽은 값 보관
rs1+imm address 계산의 base
ImmExt
sign-extended immediate
I-Typ memory offset
ALUOut
ALU result를 다음 cycle까지 보관
먼저 PC+4, 다음에는 rs1+imm를 보관
Data / MDR
memory에서 읽은 값을 다음 cycle까지 보관
Mem[rs1+imm], 즉 jump target
AdrSrc
common memory address source 선택
0이면 PC, 1이면 Result/ALUOut 기반 data access
ResultSrc=00
Result <- ALUOut
link writeback과 data memory address에 사용
ResultSrc=01
Result <- Data/memory read value
PC <- Mem[rs1+imm]
ALUSrcA=01
ALU first input = OldPC
PC+4 계산
ALUSrcA=10
ALU first input = A
rs1+imm 계산
ALUSrcB=10
ALU second input = constant 4
link address calculation
ALUSrcB=01
ALU second input = ImmExt
effective memory address
What Ability Is Tested
시험은 “명령어 의미를 state-by-state datapath 사용으로 번역할 수 있는가”를 본다. 단순히 control signal 이름을 외우는 문제가 아니라, 어떤 값이 어느 register에 보존되어 다음 state에서 쓰이는지를 추적해야 한다.
Why Students Get It Wrong
가장 흔한 실수는 PC+4와 rs1+imm가 둘 다 ALU를 쓰기 때문에 같은 cycle에 동시에 저장된다고 생각하는 것이다. Mehrtakt에서는 ALU가 하나라서 먼저 PC+4를 ALUOut에 저장하고, 다음 state에서 그 old ALUOut 값을 rd에 쓰는 동안 ALU로 rs1+imm를 새로 계산한다. 이 “old ALUOut writeback plus new ALUOut calculation”이 이 문제의 핵심이다.
Problem Interpretation
Given
Existing Mehrtakt datapath and FSM.
New opcode: 0001011.
New instruction: jalm rd, imm(rs1).
Required state order after Decode: JALM -> JALMAdr -> JALMRead -> JALMJump.
Only ResultSrc=00 and ResultSrc=01 should be used for the new states.
Delay table for 6b.
Find
For 6a, add the transition from S1: Decode and fill each new state with enough control outputs to implement:
rd <- PC_old + 4
PC <- Mem[Reg[rs1] + SignExt(imm)]
For 6b, compute the longest marked path from the Instr register to the ALUOut register:
Instr register -> control/decoder and extend path -> mux -> ALU -> ALUOut register
Constraints
Do not use ResultSrc=10 in the new states. It is used in Fetch/PCWrite paths in the current exercise style.
PCUpdate, not Branch, should perform the unconditional jump at the end.
No MemWrite: jalm reads a target from memory; it does not store.
No second register write after JALMAdr: rd receives only PC+4.
Use I-Typ immediate semantics for imm(rs1).
Traps
JALMAdr does two logically different things in one cycle: write old ALUOut=PC+4 to rd, and compute new ALUOut=rs1+imm.
JALMRead does not update PC yet. It reads memory at the address currently held in ALUOut.
JALMJump must use the memory value as PC target, therefore ResultSrc=01.
In 6b, include register clk-to-Q at the start and register setup at the destination.
Solving Procedure
Write the semantic target first:
link = PC_old + 4
addr = Reg[rs1] + SignExt(imm)
target = Mem[addr]
rd = link
PC = target
Mark what is already true after Fetch/Decode:
after S0: OldPC = PC_old, PC = PC_old + 4, Instr = jalm
after S1: A = Reg[rs1], ImmExt = SignExt(imm)
Schedule one ALU job per state:
JALM: ALUOut <- OldPC + 4
JALMAdr: rd <- old ALUOut; ALUOut <- A + ImmExt
JALMRead: Data/MDR <- Mem[ALUOut]
JALMJump: PC <- Data/MDR
Translate each job into mux values:
OldPC + 4: ALUSrcA=01, ALUSrcB=10, ALUOp=00
A + ImmExt: ALUSrcA=10, ALUSrcB=01, ALUOp=00
memory at ALUOut: ResultSrc=00, AdrSrc=1
PC from memory value: ResultSrc=01, PCUpdate=1
For timing, list only the elements on the marked register-to-register path, then sum their delays.
0 unless a memory data access is needed; JALMRead sets it to 1
6a) State-by-State Preservation Trace
Let the address of the jalm instruction be P. Let:
R = Reg[rs1]
I = SignExt(imm)
M = Mem[R + I]
Before the new states, the normal multicycle path already did this:
Time
State
Important values
after S0: Fetch
Fetch complete
OldPC=P, PC=P+4, Instr=jalm ...
after S1: Decode
Decode complete
A=R, ImmExt=I; the usual Decode ALU result is not the final target for jalm
Now the new instruction-specific states:
Cycle
State
During cycle
At cycle end
1
JALM
ALU computes OldPC + 4 = P+4
ALUOut = P+4
2
JALMAdr
ResultSrc=00 presents old ALUOut=P+4 to writeback; ALU computes A+ImmExt=R+I
Reg[rd]=P+4; ALUOut=R+I
3
JALMRead
AdrSrc=1 and ResultSrc=00 make memory address use current ALUOut=R+I
Data/MDR=M=Mem[R+I]
4
JALMJump
ResultSrc=01 presents Data/MDR=M as Result; PCUpdate=1 requests PC write
PC=M; next Fetch starts at memory target
The crucial preservation rule:
JALMAdr uses old ALUOut for rd writeback and writes new ALUOut for the following memory read.
This is legal in the Mehrtakt datapath because the register file write and ALUOut update happen at the clock edge from values that were stable during the cycle.
6a) Control Signal Justification from Current Sources
JALM copies the jal link-address idea. Uebung 7 Loesung shows jal using ALUSrcA=01, ALUSrcB=10, ALUOp=00, ResultSrc=00, and PCUpdate in its JAL state, followed by ALUWB writing the link value. For jalm, we split this so the link value is first saved in ALUOut.
JALMAdr copies the lw/sw address calculation idea. Vorlesung Teil 2 pages 55-60 and 67-69 show the memory-address step as base plus immediate, and Uebung 7 uses ALUSrcA=10, ALUSrcB=01, ALUOp=00 for memory address calculation.
JALMRead copies the lw memory-read state. The current diagrams use AdrSrc=1 for data memory access and ResultSrc=00 so the common memory address comes from the stored ALU result rather than the PC.
JALMJump copies the unconditional PC update idea from jal, but changes the source: ResultSrc=01 selects the memory-read value. Uebung 8 Loesung verifies that PCUpdate feeds PCWrite through:
PCWrite = (Branch AND Zero) OR PCUpdate
Since this is not conditional branch logic, Branch=0 and PCUpdate=1 is the right mechanism.
6b) Kritischer Pfad
The highlighted path in the recall asset goes from the Instr register to the ALUOut register through the instruction-driven decode/extend and ALU input selection logic. With the provided table:
Vorlesung Teil 2 pages 9-10 establishes the rule: the longest combinational path between two state elements determines the maximum clock frequency.
Vorlesung Teil 2 pages 52-54 and 76-78 list the same relevant delay parameters.
The downloaded recall asset aufgabe_6_5.png marks the path from Instr through control/extend/mux/ALU into ALUOut; aufgabe_6_6.png shows the exact delay values.
Exam caveat: if one analyzes a different physical implementation where decoder and extend run fully in parallel and the marked path does not force both as serial elements, the timing expression could be refined. For this recalled exam image and its expected solution path, the 300 ps answer is the supported one.
Recall-Answer Audit
Recalled claim
Audit
op=0001011 transition from Decode to JALM path
Correct for this task. Uebung 8 explicitly requires opcode-labelled transitions for added non-standard instructions.
S10 JALM: ALUSrcA=01, ALUSrcB=10, ALUOp=00
Correct. It computes OldPC+4, matching the jal link-address pattern.
Correct and subtle. It writes old ALUOut=PC+4 to rd while computing new ALUOut=rs1+imm.
S12 JALMRead: ResultSrc=00, AdrSrc=1
Correct. AdrSrc=1 makes the memory access use the address path, and ResultSrc=00 selects ALUOut as that address source.
S13 JALMJump: ResultSrc=01, PCWrite (PCUpdate)
Correct if written as PCUpdate=1; PCWrite is the derived write-enable. Uebung 8 gives the exact derivation.
T_C=300 ps
Correct for the marked path and delay table. Current lecture verifies the timing rule and delay constants; recall images verify the exact marked path.
First possible error in a student solution:
Putting RegWrite in JALM instead of JALMAdr.
Why it violates the rule: JALM is the cycle that creates PC+4 in ALUOut; the value is only available from ALUOut in the next cycle. Writing rd in the same state would use the previous unrelated ALUOut value.
Wrong-Answer Explanations
Wrong Answer 1: JALM writes rd immediately
Why a student chooses it: jal writes the link register, and the state is named JALM, so it feels natural to put RegWrite there.
Why it is wrong: in this design, ResultSrc=00 selects the registered ALUOut, not the ALU result before the edge. PC+4 becomes safely available in ALUOut only after the JALM clock edge.
Violated rule: state-to-state values need a storage location before the next state can consume them.
Fast check: ask “what is in ALUOut before JALM?” If the answer is not guaranteed to be PC+4, RegWrite cannot be in JALM.
Wrong Answer 2: JALMAdr only writes rd and does not compute rs1+imm
Why a student chooses it: the name JALMAdr can be read as “address of link” rather than “address calculation”.
Why it is wrong: the next state JALMRead needs the memory address already stored in ALUOut. Without ALUSrcA=10, ALUSrcB=01, ALUOp=00, the memory access has no valid target address.
Violated rule: every value used in a later cycle must have been produced and stored earlier.
Fast check: in JALMRead, what is AdrSrc=1 pointing to? It must point to ALUOut=rs1+imm.
Corrected approach: make JALMAdr do both Reg[rd] <- PC+4 and ALUOut <- rs1+imm.
Wrong Answer 3: JALMJump uses ResultSrc=00
Why a student chooses it: ResultSrc=00 appears in several ALUOut-based states and is used for jal PC target in the ordinary FSM.
Why it is wrong: jalm jumps to the value read from memory, not to the address rs1+imm. If ResultSrc=00, PC would become the memory address, not the memory contents.
Violated rule: distinguish memory address from memory data.
Fast check:
addr = rs1 + imm
target = Mem[addr]
PC must become target, not addr.
Why a student chooses it: both branch and jump change PC.
Why it is wrong: Branch is conditional and is combined with Zero. jalm is an unconditional jump through memory.
Violated rule: current Loesung 8 defines PCWrite=(Branch AND Zero) OR PCUpdate.
Fast check: jalm has no compare result and should not depend on Zero.
Corrected approach: keep Branch=0; set PCUpdate=1.
Wrong Answer 5: omit t_pcq or t_setup in 6b
Why a student chooses it: they focus only on visible combinational blocks.
Why it is wrong: the path is register-to-register. A source register needs clk-to-Q time, and the destination register needs setup time.
Violated rule: kritischer Pfad in a sequential circuit includes register timing at both ends.
Fast check: if the path starts at a register and ends at a register, write t_pcq first and t_setup last.
Corrected approach:
T_C = 40 + 25 + 35 + 30 + 120 + 50 = 300 ps
Exam-Room Method
Time budget: 14 minutes.
Suggested split:
Minute
Work
0-2
Write semantic equation: rd <- PC+4, PC <- Mem[rs1+imm]
2-5
Write preservation trace: ALUOut=PC+4, then ALUOut=rs1+imm, then Data=Mem[...]
5-9
Fill FSM states and transitions
9-11
Add defaults and check no unwanted RegWrite, MemWrite, Branch, IRWrite
11-13
Compute 6b timing formula and numeric sum
13-14
Final sanity check: address vs memory contents, PCUpdate, units ps
First table to write:
State Produces / consumes
JALM ALUOut <- PC+4
JALMAdr rd <- old ALUOut; ALUOut <- rs1+imm
JALMRead Data <- Mem[ALUOut]
JALMJump PC <- Data
Partial-credit work:
If you forget one signal, still write the semantic state action. It can earn method points.
If you are unsure about PCWrite vs PCUpdate, write PCUpdate=1 -> PCWrite=1 and the formula from Loesung 8.
If you are unsure about state numbers, use the required names. The exact numbering S10 to S13 matters less than transition order and signals.
Last check:
rd gets PC+4, not memory data.
PC gets memory data, not rs1+imm.
Memory address is rs1+imm, not PC+4.
No MemWrite anywhere.
Active Recall
Questions
Concept check: Why can JALMAdr write rd <- PC+4 and compute rs1+imm in the same state?
Hand trace: Suppose PC_old=0x1000, rs1=0x2000, imm=0x10, and Mem[0x2010]=0x5000. What are rd, ALUOut, Data/MDR, and PC after the four new states?
Control check: Which state needs AdrSrc=1, and why?
Transfer variant: If a new instruction jm imm(rs1) jumps to Mem[rs1+imm] but does not write rd, which state can be removed or simplified compared with jalm?
Timing check: Why do t_pcq and t_setup appear in T_C?
Answers
Because rd receives the old registered ALUOut value from the previous state, while the ALU computes a new value that is stored into ALUOut at the end of the current cycle.
JALMRead needs AdrSrc=1 so the shared memory address comes from the data-address path, i.e. ALUOut=rs1+imm, rather than from PC.
The link-write part is unnecessary. One could compute rs1+imm, read memory, and update PC. If the required state order still reserves a link state, it would not assert RegWrite.
The path starts at a register output and ends at a register input. After the clock edge, the source register output is valid only after clk-to-Q; before the next edge, the destination register input must satisfy setup time.