Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
U
urv-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
urv-core
Commits
a102497b
Commit
a102497b
authored
Sep 15, 2022
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtl: add fault output (in case of unfixable ecc error)
parent
01d9672d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
urv_cpu.v
rtl/urv_cpu.v
+23
-14
urv_exec.v
rtl/urv_exec.v
+4
-0
No files found.
rtl/urv_cpu.v
View file @
a102497b
...
...
@@ -40,16 +40,19 @@ module urv_cpu
parameter
g_with_compressed_insns
=
0
)
(
input
clk_i
,
input
rst_i
,
input
clk_i
,
input
rst_i
,
input
irq_i
,
input
irq_i
,
// For ECC double error
output
fault_o
,
// instruction mem I/F
output
[
31
:
0
]
im_addr_o
,
output
im_rd_o
,
output
im_rd_o
,
input
[
31
:
0
]
im_data_i
,
input
im_valid_i
,
input
im_valid_i
,
// data mem I/F
// The interface is pipelined: store/load are asserted for one cycle
...
...
@@ -59,10 +62,10 @@ module urv_cpu
input
[
31
:
0
]
dm_data_l_i
,
output
[
3
:
0
]
dm_data_select_o
,
output
dm_store_o
,
output
dm_load_o
,
input
dm_load_done_i
,
input
dm_store_done_i
,
output
dm_store_o
,
output
dm_load_o
,
input
dm_load_done_i
,
input
dm_store_done_i
,
// Debug I/F
// Debug mode is entered either when dbg_force_i is set, or when the ebreak
...
...
@@ -73,14 +76,14 @@ module urv_cpu
// In debug mode, instructions are executed from dbg_insn_i.
// As instructions are always fetched, they must be always valid. Use
// a nop (0x13) if nothing should be executed.
input
dbg_force_i
,
output
dbg_enabled_o
,
input
dbg_force_i
,
output
dbg_enabled_o
,
input
[
31
:
0
]
dbg_insn_i
,
input
dbg_insn_set_i
,
output
dbg_insn_ready_o
,
input
dbg_insn_set_i
,
output
dbg_insn_ready_o
,
input
[
31
:
0
]
dbg_mbx_data_i
,
input
dbg_mbx_write_i
,
input
dbg_mbx_write_i
,
output
[
31
:
0
]
dbg_mbx_data_o
)
;
...
...
@@ -95,6 +98,8 @@ module urv_cpu
wire
w_stall_req
;
wire
x_stall_req
;
wire
x_fault
;
// X1->F stage interface
wire
[
31
:
0
]
x2f_pc_bra
;
wire
x2f_bra
;
...
...
@@ -310,6 +315,8 @@ module urv_cpu
.
x_kill_i
(
x_kill
)
,
.
x_stall_req_o
(
x_stall_req
)
,
.
x_fault_o
(
x_fault
)
,
// from register file
.
rf_rs1_value_i
(
x_rs1_value
)
,
.
rf_rs2_value_i
(
x_rs2_value
)
,
...
...
@@ -423,6 +430,8 @@ module urv_cpu
.
rf_rd_write_o
(
rf_rd_write
)
)
;
assign
fault_o
=
x_fault
&
g_with_ecc
;
// Built-in timer
generate
if
(
g_timer_frequency
>
0
)
...
...
rtl/urv_exec.v
View file @
a102497b
...
...
@@ -37,6 +37,8 @@ module urv_exec
input
x_kill_i
,
output
reg
x_stall_req_o
,
// Unfixable ecc error
output
reg
x_fault_o
,
input
[
31
:
0
]
d_pc_i
,
input
[
4
:
0
]
d_rd_i
,
...
...
@@ -513,6 +515,7 @@ module urv_exec
w_load_o
<=
0
;
w_store_o
<=
0
;
w_ecc_flip_o
<=
2'b0
;
x_fault_o
<=
0
;
// Values so that 0 could be written to register 0.
w_rd_value_o
<=
0
;
w_rd_o
<=
0
;
...
...
@@ -531,6 +534,7 @@ module urv_exec
w_rd_o
<=
d_rd_i
;
w_rd_value_o
<=
rd_value
;
w_ecc_flip_o
<=
{
2
{
d_is_write_ecc_i
}}
&
rs2
[
1
:
0
]
;
x_fault_o
<=
d_is_fix_ecc_i
&
rf_rs1_ecc_err_i
&
rf_rs2_ecc_err_i
;
f_branch_take
<=
branch_take
&&
!
x_kill_i
&&
d_valid_i
;
f_dbg_toggle_o
<=
g_with_hw_debug
&&
d_is_ebreak_i
&&
!
x_kill_i
&&
d_valid_i
;
...
...
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