Skip to content

Commit 1d53a7c

Browse files
authored
fix(cpp): re-add functions deleted by #584 (#681)
fixes #678
1 parent 802a8e7 commit 1d53a7c

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/regress.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,4 +182,4 @@ jobs:
182182
- name: singularity setup
183183
uses: ./.github/actions/singularity-setup
184184
- name: Run cpp unit tests
185-
run: ./do test:cpp_hart CONFIG=rv64
185+
run: ./do test:cpp_hart CONFIG=rv64 JOBS=4

backends/cpp_hart_gen/tasks.rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ rule %r{#{CPP_HART_GEN_DST}/.*/include/udb/cfgs/[^/]+/[^/]+\.h(xx)?\.unformatted
133133
"#{CPP_HART_GEN_SRC}/lib/gen_cpp.rb",
134134
"#{$root}/lib/idl/passes/prune.rb",
135135
"#{CPP_HART_GEN_SRC}/lib/template_helpers.rb",
136-
"#{CPP_HART_GEN_SRC}/lib/csr_backend_helpers.rb",
136+
"#{CPP_HART_GEN_SRC}/lib/csr_template_helpers.rb",
137137
__FILE__
138138
]
139139
} do |t|
@@ -167,7 +167,7 @@ rule %r{#{CPP_HART_GEN_DST}/.*/src/cfgs/[^/]+/[^/]+\.cxx\.unformatted$} => proc
167167
"#{CPP_HART_GEN_SRC}/lib/gen_cpp.rb",
168168
"#{$root}/lib/idl/passes/prune.rb",
169169
"#{CPP_HART_GEN_SRC}/lib/template_helpers.rb",
170-
"#{CPP_HART_GEN_SRC}/lib/csr_backend_helpers.rb",
170+
"#{CPP_HART_GEN_SRC}/lib/csr_template_helpers.rb",
171171
__FILE__
172172
]
173173
} do |t|

lib/arch_obj_models/parameter.rb

+10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ def schema_type
3636
@schema.to_pretty_s
3737
end
3838

39+
# @returns [Object] default value, or nil if none
40+
def default
41+
if @data["schema"].key?("default")
42+
@data["schema"]["default"]
43+
end
44+
end
45+
3946
# @param ext [Extension]
4047
# @param name [String]
4148
# @param data [Hash<String, Object]
@@ -129,6 +136,9 @@ def extra_validation = @param.extra_validation
129136
# @return [Extension] The extension that defines this parameter
130137
def exts = @param.exts
131138

139+
# @returns [Idl::Type] Type of the parameter
140+
def idl_type = @param.idl_type
141+
132142
def initialize(param, value)
133143
@param = param
134144
@value = value

0 commit comments

Comments
 (0)