25 lines
9.6 KiB
JSON
25 lines
9.6 KiB
JSON
{
|
|
"$schema": "../../../../tools/card-layouts/schemas/card-source.schema.json", "schema": "esc-card-source.v1",
|
|
"card": {"id": "mpabi-inf-rv32i-asm-06-control-flow", "series": "rv32i-asm", "series_title": "ASM · RV32I From Blinker to RISC-V", "number": "06", "count": "09", "slug": "control-flow", "title": "L06 · Control Flow — Jumps and Branches", "topic": "Warunki B-type, immediate B/J i następny PC", "project": "Sterowanie przepływem minimalnego rdzenia", "subject": "Informatyka", "level": "Rok 1 · RTL · RV32I", "revision_date": "2026-07-21T00:00:00+02:00", "status": "Gotowa do symulacji", "version": "v00.01", "uuid": "20d3f96a-8140-59d7-b909-c6244d4555c5", "author": "M. Pabiszczak", "year": "2026"},
|
|
"generated": {"tex": "doc/generated/main.tex", "html": "web/index.html", "html_css": "web/style.css", "react_app": true, "html_tree_inspector": false}, "template": "templates/karta-klasyczna.json",
|
|
"title_block": {"category": "KARTA PRACY · INFORMATYKA · RTL", "standard": "ISO 7200", "prepared_by": "M. Pabiszczak", "prepared_on": "21.07.2026", "checked_by": "testy automatyczne", "approved_by": "—", "url": "http://localhost:8080", "repository_url": "https://gitea.local/edu-inf/lab-rv32i-asm-control-flow", "revision": "1", "issued_on": "21.07.2026", "series": "RV32I-ASM-06", "document_type": "karta pracy", "tool": "card-layouts", "sheet": "1 / 1", "show_qr": false, "show_repository_qr": false, "height_cm": 3, "repeat_on_every_page": true, "replace_front_matter": true},
|
|
"front_page_scope": {"title": "Cel karty", "content_tex": "Uczeń implementuje sześć warunków gałęzi, odtwarza przesunięcia B/J i steruje rejestrem PC.", "scope_title": "Zakres tasków", "scope_table": {"headers": ["Krok", "Numer tasku", "Najważniejsza idea", "Priorytet", "Status", "Version"], "rows": [{"chapter": "8", "task": "Task01", "idea_tex": "sześć warunków branch", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}, {"chapter": "8", "task": "Task02", "idea_tex": "immediate B/J i target", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}, {"chapter": "8", "task": "Task03", "idea_tex": "priorytet następnego PC", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}]}},
|
|
"side_margin_tree_layout": {"columns": [{"id": "zawodowe", "label": "TECH", "side": "left", "tree": "WE -> EK -> KW", "description": "Komparator, immediate i rejestr PC."}, {"id": "ogolne", "label": "OG", "side": "right", "tree": "WE -> EN -> KW", "description": "Analiza signed/unsigned i sekwencji."}]},
|
|
"learning_effects": {"RV06.EN01": {"bloom_level": "Analiza", "label": "Decyzja", "text": "Uczeń rozróżnia signed i unsigned w warunkach gałęzi.", "assessment_criteria": ["RV06.KW01"]}, "RV06.EK01": {"bloom_level": "Tworzenie", "label": "Następny PC", "text": "Uczeń implementuje immediate B/J i priorytet aktualizacji PC.", "assessment_criteria": ["RV06.KW01"]}},
|
|
"assessment_criteria": {"RV06.KW01": {"text": "Sześć warunków, dwa cele PC-relative i kontrolowana sekwencja PC są zgodne w modelu i RTL.", "learning_effects": ["RV06.EN01", "RV06.EK01"]}},
|
|
"educational_requirements": {"RV06.WE01": {"text": "Zbudowanie mierzalnego sterowania przepływem RV32I.", "label": "Branch, jump i PC", "learning_effects": ["RV06.EN01", "RV06.EK01"], "learning_tree": {"schema": "we-learning-tree.v1", "policy": "Nielegalny funct3 nigdy nie kieruje PC do celu.", "ogolne": [{"effect_ref": "RV06.EN01", "display": "EN IP WO RV06.01", "source": "IP", "official": "RV06.01", "local": "01", "text": "Uczeń analizuje decyzję branch.", "kind": "WO", "tree_id": "RV06.WE01.OG.IP.01", "kw": [{"criterion_ref": "RV06.KW01", "display": "KW IP WS RV06.01", "source": "IP", "kind": "WS", "official": "RV06.01", "local": "01", "text": "Signed i unsigned dają świadomie różne wyniki."}] }], "zawodowe": [{"effect_ref": "RV06.EK01", "display": "EK INF04 RV06.01", "source": "I4", "official": "RV06.01", "local": "01", "text": "Uczeń tworzy tor następnego PC.", "kind": "EK", "tree_id": "RV06.WE01.TECH.I4.01", "kw": [{"criterion_ref": "RV06.KW01", "display": "KW INF04 RV06.01", "source": "I4", "kind": "KW", "official": "RV06.01", "local": "01", "text": "PC realizuje fall-through, branch i jump."}] }]}}},
|
|
"sections": [
|
|
{"title": "Task01 · Warunki gałęzi", "order": 10, "content_kind": "prose", "content_tex": "Porównaj sześć wartości \texttt{funct3}. BLT i BGE interpretują argumenty jako signed, a BLTU i BGEU jako unsigned.", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"], "area_tree_refs": ["RV06.WE01.OG.IP.01", "RV06.WE01.TECH.I4.01"], "steps": [{"id": "T01-PREDICT", "title": "Przewidź BLT i BLTU dla ffffffff oraz 1.", "tree_refs": ["RV06.WE01.OG.IP.01"], "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01"], "assessment_criterion_refs": ["RV06.KW01"]}, {"id": "T01-TRACE", "title": "Zmierz sześć warunków oraz zachowanie illegal.", "tree_refs": ["RV06.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"]}], "assets": [{"path": "assets/control-flow.png", "html_path": "assets/control-flow.svg", "caption": "Komparator i immediate sterują wyborem następnego PC.", "label": "fig:control-flow", "alt": "Diagram compare, immediate, next mux i PC.", "kind": "diagram", "width": 0.9}]},
|
|
{"title": "Task02 · Immediate B/J", "order": 20, "content_kind": "prose", "content_tex": "Odtwórz rozproszone bity immediate, dołącz niejawne zero i wykonaj dodawanie PC-relative.", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"], "area_tree_refs": ["RV06.WE01.OG.IP.01", "RV06.WE01.TECH.I4.01"], "steps": [{"id": "T02-TARGET", "title": "Wyznacz cele branch +12 i JAL -8 od PC=0x100.", "tree_refs": ["RV06.WE01.OG.IP.01", "RV06.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"]}]},
|
|
{"title": "Task03 · Rejestr PC", "order": 30, "content_kind": "prose", "content_tex": "Wykonaj fall-through, branch i jump. Skok ma pierwszeństwo przed gałęzią, a gałąź przed \texttt{pc+4}.", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"], "area_tree_refs": ["RV06.WE01.OG.IP.01", "RV06.WE01.TECH.I4.01"], "steps": [{"id": "T03-SEQUENCE", "title": "Zmierz sekwencję 0, 4, 8, 20, 24, 10, 14 w zapisie hex.", "tree_refs": ["RV06.WE01.OG.IP.01", "RV06.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_refs": ["RV06.KW01"]}]}
|
|
],
|
|
"tasks": {"task01": {"prompt_tex": "Zweryfikuj sześć warunków B-type.", "criterion": "conditions=6 signed_lt=1 unsigned_lt=0 illegal=1", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_ref": "RV06.KW01", "links": {"equations": [], "figures": ["fig:control-flow"]}}, "task02": {"prompt_tex": "Odtwórz immediate i cele B/J.", "criterion": "branch_imm=12 branch_target=0000010c jal_imm=-8 jal_target=000000f8", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_ref": "RV06.KW01", "links": {"equations": [], "figures": ["fig:control-flow"]}}, "task03": {"prompt_tex": "Wykonaj kontrolowaną sekwencję PC.", "criterion": "pc=00000000,00000004,00000008,00000020,00000024,00000010,00000014 branches=1 jumps=1", "educational_requirement_refs": ["RV06.WE01"], "learning_effect_refs": ["RV06.EN01", "RV06.EK01"], "assessment_criterion_ref": "RV06.KW01", "links": {"equations": [], "figures": ["fig:control-flow"]}}},
|
|
"tasks_order": ["task01", "task02", "task03"], "mission": "Połącz decyzję branch, dekodowanie immediate i wybór następnego PC.", "objectives": ["Rozróżnisz porównania signed i unsigned.", "Odtworzysz immediate B/J.", "Zrealizujesz priorytet aktualizacji PC."],
|
|
"agenda": [{"time": "0--25 min", "work": "Warunki branch."}, {"time": "25--45 min", "work": "Immediate oraz cele."}, {"time": "45--70 min", "work": "Sekwencja PC i VCD."}],
|
|
"tech_stack": {"software": [{"name": "SystemVerilog", "use": "sterowanie przepływem"}, {"name": "Verilator", "use": "test i VCD"}, {"name": "stemctl", "use": "profile wykonania"}], "hardware": [{"name": "Brak wymaganego FPGA", "use": "deterministyczna symulacja RTL"}]},
|
|
"theory_refs": {"intro": "Gałąź warunkowa wybiera między PC+4 i celem PC-relative; JAL wybiera cel bezwarunkowo.", "known_refs": [], "new_concepts": [{"term": "branch target", "definition": "PC powiększony o sign-extended immediate B."}, {"term": "fall-through", "definition": "Następna instrukcja pod adresem PC+4."}]},
|
|
"container_test": {"title": "Test bez płytki", "commands": ["stemctl test native-amd64 rv32i-asm L06 1", "stemctl test hazard3-sim rv32i-asm L06 2", "stemctl debug hazard3-sim rv32i-asm L06 3"], "pass_condition": "Modele i RTL zwracają trzy komunikaty PASS, a debug zapisuje VCD."},
|
|
"safety_rules": [{"title": "Illegal fail-closed", "body": "Nieznany funct3 nigdy nie ustawia taken."}, {"title": "Priorytet PC", "body": "Jump wygrywa z branch, branch z pc+4."}],
|
|
"hardware_procedure": [{"step": "1", "action": "Uruchom model porównań.", "condition": "Wyniki signed/unsigned zapisane przed RTL."}, {"step": "2", "action": "Sprawdź immediate B/J.", "condition": "Cele 0x10c oraz 0x0f8."}, {"step": "3", "action": "Wykonaj sekwencję PC i zapisz VCD.", "condition": "Jedna gałąź, jeden skok."}], "references": []
|
|
}
|