11backends/certificate_doc/tasks.rake
2- base_cfg_arch = cfg_arch_for("rv#{base}") # rv32 or rv64
2+ bootstrap_cfg_arch = cfg_arch_for("rv#{base}") # rv32 or rv64
33 Rakefile
44 Calls ConfiguredArchitecture.new("gen/resolved_arch/rv32")
55 Calls Architecture.new # Parent class
@@ -8,7 +8,7 @@ base_cfg_arch = cfg_arch_for("rv#{base}") # rv32 or rv64
88 Calls PartialConfig.new(cfg path, @data) # Uses Ruby send() method
99 @mxlen = @data["params"].xlen
1010 @name = "rv32"
11- base_cert_model = base_cfg_arch .cert_model(cert_model_name = "MC100-32")
11+ bootstrap_cert_model = bootstrap_cfg_arch .cert_model(cert_model_name = "MC100-32")
1212 Calls self.generate_obj_methods("cert_model", "certificate_model", CertModel) in Architecture # Magic
1313 Calls define_method("cert_model")
1414 Calls define_method("cert_models")
@@ -19,3 +19,65 @@ base_cert_model = base_cfg_arch.cert_model(cert_model_name = "MC100-32")
1919 @data = yaml
2020 @cfg_arch = arch # rv32 (nil if Architecture object provided)
2121 @specification = arch # rv32
22+ cfg_arch = bootstrap_cert_model.to_cfg_arch # In Portfolio class
23+ Creates hash with mandatory extensions (with version requirement) and params
24+ Uses in_scope_ext_reqs() and all_in_scope_ext_params() in Portfolio
25+ Writes hash to yaml file in /tmp/.../MC100-32/cfg.yaml
26+ Passes yaml file to ConfiguredArchitecture.new()
27+ Creates Architecture (base class), Config, and PartialConfig again (see above)
28+ cert_model = cfg_arch.cert_model(cert_model_name)
29+ Creates CertModel for every model in the database and stores it in the real ConfiguredArchitecture object
30+ Calls ERB template
31+ Converts ERB result to ASCIIDOC
32+
33+
34+ ==============================================================================================
35+ Actual rv32/cfg.yaml
36+ ---
37+ $schema: config_schema.json#
38+ kind: architecture configuration
39+ type: partially configured
40+ name: rv32
41+ description: A generic RV32 system; only MXLEN is known
42+ params:
43+ XLEN: 32
44+ mandatory_extensions:
45+ - name: "I"
46+ version: ">= 0"
47+ - name: "Sm"
48+ version: ">= 0"
49+ ===============================================================================================
50+ Example of /tmp/.../MC100-32/cfg.yaml
51+ ---
52+ "$schema": config_schema.json
53+ type: partially configured
54+ kind: architecture configuration
55+ name: MC100-32
56+ description: A partially configured architecture definition corresponding to the MC100-32
57+ portfolio.
58+ mandatory_extensions:
59+ - name: I
60+ version:
61+ - "~> 2.1"
62+ - name: C
63+ version:
64+ - "~> 2.2"
65+ - name: M
66+ version:
67+ - "~> 2.0"
68+ - name: Zicsr
69+ version:
70+ - "~> 2.0"
71+ - name: Zicntr
72+ version:
73+ - "~> 2.0"
74+ - name: Sm
75+ version:
76+ - "~> 1.11.0"
77+ params:
78+ MISALIGNED_SPLIT_STRATEGY: by_byte
79+ PRECISE_SYNCHRONOUS_EXCEPTIONS: true
80+ TRAP_ON_ECALL_FROM_M: true
81+ TRAP_ON_EBREAK: true
82+ M_MODE_ENDIANESS: little
83+ XLEN: 32
0 commit comments