Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Panda
RISC-V DV
Commits
ed1210e5
Commit
ed1210e5
authored
Mar 10, 2020
by
Tao Liu
Browse files
Add section for each data region
parent
3f584ade
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/riscv_asm_program_gen.sv
View file @
ed1210e5
...
...
@@ -347,6 +347,9 @@ class riscv_asm_program_gen extends uvm_object;
if
(
cfg
.
use_push_data_section
)
begin
instr_stream
.
push_back
($
sformatf
(
".pushsection .%0suser_stack,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
else
begin
instr_stream
.
push_back
($
sformatf
(
".section .%0suser_stack,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
instr_stream
.
push_back
(
".align 12"
);
instr_stream
.
push_back
(
get_label
(
"user_stack_start:"
,
hart
));
...
...
@@ -365,6 +368,9 @@ class riscv_asm_program_gen extends uvm_object;
if
(
cfg
.
use_push_data_section
)
begin
instr_stream
.
push_back
($
sformatf
(
".pushsection .%0skernel_stack,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
else
begin
instr_stream
.
push_back
($
sformatf
(
".section .%0skernel_stack,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
instr_stream
.
push_back
(
".align 12"
);
instr_stream
.
push_back
(
get_label
(
"kernel_stack_start:"
,
hart
));
...
...
@@ -1059,6 +1065,9 @@ class riscv_asm_program_gen extends uvm_object;
if
(
cfg
.
use_push_data_section
)
begin
instr_stream
.
push_back
($
sformatf
(
".pushsection .%0spage_table,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
else
begin
instr_stream
.
push_back
($
sformatf
(
".section .%0spage_table,
\"
aw
\"
,@progbits;"
,
hart_prefix
(
hart
)));
end
foreach
(
page_table_list
.
page_table
[
i
])
begin
page_table_list
.
page_table
[
i
].
gen_page_table_section
(
page_table_section
);
...
...
src/riscv_data_page_gen.sv
View file @
ed1210e5
...
...
@@ -75,12 +75,18 @@ class riscv_data_page_gen extends uvm_object;
if
(
cfg
.
use_push_data_section
)
begin
data_page_str
.
push_back
($
sformatf
(
".pushsection .%0s,
\"
aw
\"
,@progbits;"
,
mem_region_setting
[
i
].
name
));
end
else
begin
data_page_str
.
push_back
($
sformatf
(
".section .%0s,
\"
aw
\"
,@progbits;"
,
mem_region_setting
[
i
].
name
));
end
data_page_str
.
push_back
($
sformatf
(
"%0s:"
,
mem_region_setting
[
i
].
name
));
end
else
begin
if
(
cfg
.
use_push_data_section
)
begin
data_page_str
.
push_back
($
sformatf
(
".pushsection .%0s,
\"
aw
\"
,@progbits;"
,
{
hart_prefix
(
hart_id
),
mem_region_setting
[
i
].
name
}
));
end
else
begin
data_page_str
.
push_back
($
sformatf
(
".section .%0s,
\"
aw
\"
,@progbits;"
,
{
hart_prefix
(
hart_id
),
mem_region_setting
[
i
].
name
}
));
end
data_page_str
.
push_back
($
sformatf
(
"%0s:"
,
{
hart_prefix
(
hart_id
),
mem_region_setting
[
i
].
name
}
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment