Files
lab-rv32i-asm-alu/json/card_source.json
T

25 lines
9.5 KiB
JSON

{
"$schema": "../../../../tools/card-layouts/schemas/card-source.schema.json", "schema": "esc-card-source.v1",
"card": {"id": "mpabi-inf-rv32i-asm-05-alu", "series": "rv32i-asm", "series_title": "ASM · RV32I From Blinker to RISC-V", "number": "05", "count": "09", "slug": "alu", "title": "L05 · ALU and the Verilog Assembler", "topic": "Operacje RV32I, kodowanie R/I i writeback", "project": "Etap wykonania 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": "aabf60d8-9071-5f77-9bbb-2fc500f05358", "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-alu", "revision": "1", "issued_on": "21.07.2026", "series": "RV32I-ASM-05", "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 ALU, składa słowa instrukcji R/I i wykonuje program z kontrolowanym writeback.", "scope_title": "Zakres tasków", "scope_table": {"headers": ["Krok", "Numer tasku", "Najważniejsza idea", "Priorytet", "Status", "Version"], "rows": [{"chapter": "6", "task": "Task01", "idea_tex": "10 operacji ALU", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}, {"chapter": "7", "task": "Task02", "idea_tex": "enkoder formatów R/I", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}, {"chapter": "7", "task": "Task03", "idea_tex": "execute i writeback", "priority": "obowiązkowe", "status": "ready", "version": "v00.01"}]}},
"side_margin_tree_layout": {"columns": [{"id": "zawodowe", "label": "TECH", "side": "left", "tree": "WE -> EK -> KW", "description": "ALU, enkoder i etap execute."}, {"id": "ogolne", "label": "OG", "side": "right", "tree": "WE -> EN -> KW", "description": "Przewidywanie operacji bitowych."}]},
"learning_effects": {"RV05.EN01": {"bloom_level": "Analiza", "label": "Operacje", "text": "Uczeń rozróżnia arytmetykę signed/unsigned i logiczne przesunięcia.", "assessment_criteria": ["RV05.KW01"]}, "RV05.EK01": {"bloom_level": "Tworzenie", "label": "Execute", "text": "Uczeń implementuje ALU, enkoder i writeback legalnych instrukcji.", "assessment_criteria": ["RV05.KW01"]}},
"assessment_criteria": {"RV05.KW01": {"text": "Dziesięć operacji ALU, dwa kodowania i czteroinstrukcyjny program są zgodne w modelu i RTL.", "learning_effects": ["RV05.EN01", "RV05.EK01"]}},
"educational_requirements": {"RV05.WE01": {"text": "Zbudowanie mierzalnego etapu wykonania RV32I.", "label": "ALU i writeback", "learning_effects": ["RV05.EN01", "RV05.EK01"], "learning_tree": {"schema": "we-learning-tree.v1", "policy": "Nielegalna operacja nigdy nie zapisuje rd.", "ogolne": [{"effect_ref": "RV05.EN01", "display": "EN IP WO RV05.01", "source": "IP", "official": "RV05.01", "local": "01", "text": "Uczeń analizuje wynik bitowy.", "kind": "WO", "tree_id": "RV05.WE01.OG.IP.01", "kw": [{"criterion_ref": "RV05.KW01", "display": "KW IP WS RV05.01", "source": "IP", "kind": "WS", "official": "RV05.01", "local": "01", "text": "Signed, unsigned i przesunięcia mają poprawne wyniki."}]}], "zawodowe": [{"effect_ref": "RV05.EK01", "display": "EK INF04 RV05.01", "source": "I4", "official": "RV05.01", "local": "01", "text": "Uczeń tworzy etap execute.", "kind": "EK", "tree_id": "RV05.WE01.TECH.I4.01", "kw": [{"criterion_ref": "RV05.KW01", "display": "KW INF04 RV05.01", "source": "I4", "kind": "KW", "official": "RV05.01", "local": "01", "text": "Program kończy się x3=12 i x4=7."}]}]}}},
"sections": [
{"title": "Task01 · ALU", "order": 10, "content_kind": "prose", "content_tex": "Sprawdź dziesięć operacji. \\texttt{SRA} i \\texttt{SLT} używają interpretacji signed; \\texttt{SRL} i \\texttt{SLTU} używają surowych bitów bez znaku.", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"], "area_tree_refs": ["RV05.WE01.OG.IP.01", "RV05.WE01.TECH.I4.01"], "steps": [{"id": "T01-PREDICT", "title": "Przewidź wyniki SRA/SRL i SLT/SLTU.", "tree_refs": ["RV05.WE01.OG.IP.01"], "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01"], "assessment_criterion_refs": ["RV05.KW01"]}, {"id": "T01-TRACE", "title": "Porównaj dziesięć wektorów i zapisz VCD.", "tree_refs": ["RV05.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"]}], "assets": [{"path": "assets/alu-path.png", "html_path": "assets/alu-path.svg", "caption": "Od enkodera przez dekoder i ALU do kontrolowanego writeback.", "label": "fig:alu-path", "alt": "Diagram assembler, decode, ALU, writeback.", "kind": "diagram", "width": 0.9}]},
{"title": "Task02 · Verilog assembler", "order": 20, "content_kind": "prose", "content_tex": "Złóż pola w kolejności określonej formatem. Ujemne immediate przechowuje 12 młodszych bitów reprezentacji uzupełnieniowej.", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"], "area_tree_refs": ["RV05.WE01.OG.IP.01", "RV05.WE01.TECH.I4.01"], "steps": [{"id": "T02-ENCODE", "title": "Złóż ADD i ADDI przed porównaniem z testbenchem.", "tree_refs": ["RV05.WE01.OG.IP.01", "RV05.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"]}]},
{"title": "Task03 · Execute", "order": 30, "content_kind": "prose", "content_tex": "Wykonaj ADDI, ADDI, ADD i SUB. Każdy writeback staje się operandem następnej zależnej instrukcji; illegal blokuje zapis.", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"], "area_tree_refs": ["RV05.WE01.OG.IP.01", "RV05.WE01.TECH.I4.01"], "steps": [{"id": "T03-PROGRAM", "title": "Zmierz x1=7, x2=5, x3=12 i x4=7.", "tree_refs": ["RV05.WE01.OG.IP.01", "RV05.WE01.TECH.I4.01"], "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_refs": ["RV05.KW01"]}]}
],
"tasks": {"task01": {"prompt_tex": "Zweryfikuj 10 operacji ALU.", "criterion": "ops=10 signed_lt=1 unsigned_lt=0 sra=f8000000", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_ref": "RV05.KW01", "links": {"equations": [], "figures": ["fig:alu-path"]}}, "task02": {"prompt_tex": "Złóż słowa ADD i ADDI -4.", "criterion": "add=002081b3 addi_neg4=ffc30293", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_ref": "RV05.KW01", "links": {"equations": [], "figures": ["fig:alu-path"]}}, "task03": {"prompt_tex": "Wykonaj cztery instrukcje z kontrolą writeback.", "criterion": "instructions=4 x1=7 x2=5 x3=12 x4=7", "educational_requirement_refs": ["RV05.WE01"], "learning_effect_refs": ["RV05.EN01", "RV05.EK01"], "assessment_criterion_ref": "RV05.KW01", "links": {"equations": [], "figures": ["fig:alu-path"]}}},
"tasks_order": ["task01", "task02", "task03"], "mission": "Połącz operacje ALU z kodowaniem instrukcji i bezpiecznym writeback.", "objectives": ["Rozróżnisz operacje signed i unsigned.", "Zakodujesz formaty R oraz I.", "Wykonasz zależny program czterech instrukcji."],
"agenda": [{"time": "0--25 min", "work": "Wektory ALU."}, {"time": "25--45 min", "work": "Kodowanie R/I."}, {"time": "45--70 min", "work": "Program execute i VCD."}],
"tech_stack": {"software": [{"name": "SystemVerilog", "use": "ALU i execute"}, {"name": "Verilator", "use": "test i VCD"}, {"name": "stemctl", "use": "profile wykonania"}], "hardware": [{"name": "Brak wymaganego FPGA", "use": "deterministyczna symulacja RTL"}]},
"theory_refs": {"intro": "funct3, funct7 i opcode wybierają operację oraz źródło drugiego argumentu.", "known_refs": [], "new_concepts": [{"term": "ALU", "definition": "Kombinacyjny blok arytmetyczno-logiczny."}, {"term": "writeback", "definition": "Kontrolowany zapis wyniku do rd."}]},
"container_test": {"title": "Test bez płytki", "commands": ["stemctl test native-amd64 rv32i-asm L05 1", "stemctl test hazard3-sim rv32i-asm L05 2", "stemctl debug hazard3-sim rv32i-asm L05 3"], "pass_condition": "Modele i RTL zwracają trzy komunikaty PASS, a debug zapisuje VCD."},
"safety_rules": [{"title": "Writeback fail-closed", "body": "Nielegalna instrukcja zeruje write_enable."}, {"title": "Szerokość przesunięcia", "body": "RV32 używa wyłącznie operand_b[4:0]."}],
"hardware_procedure": [{"step": "1", "action": "Uruchom model ALU.", "condition": "Wyniki signed i unsigned zapisane przed RTL."}, {"step": "2", "action": "Sprawdź kodowania R/I.", "condition": "Słowa 002081b3 i ffc30293."}, {"step": "3", "action": "Wykonaj program i zapisz VCD.", "condition": "x3=12, x4=7, brak illegal."}], "references": []
}