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
e5f1afaf
Commit
e5f1afaf
authored
Feb 11, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set r0 to 0 during reset (for flash FPGAs).
parent
193f15db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
urv_exec.v
rtl/urv_exec.v
+6
-1
urv_regfile.v
rtl/urv_regfile.v
+4
-4
No files found.
rtl/urv_exec.v
View file @
e5f1afaf
...
...
@@ -503,7 +503,12 @@ module urv_exec
f_dbg_toggle_o
<=
0
;
w_load_o
<=
0
;
w_store_o
<=
0
;
w_valid_o
<=
0
;
// Values so that 0 could be written to register 0.
w_rd_value_o
<=
0
;
w_rd_o
<=
0
;
w_rd_source_o
<=
`RD_SOURCE_ALU
;
w_rd_write_o
<=
1
;
w_valid_o
<=
1
;
end
else
begin
...
...
rtl/urv_regfile.v
View file @
e5f1afaf
...
...
@@ -31,7 +31,6 @@
module
urv_regmem
(
input
clk_i
,
input
rst_i
,
input
en1_i
,
input
[
4
:
0
]
a1_i
,
...
...
@@ -92,12 +91,14 @@ module urv_regfile
wire
[
31
:
0
]
rs1_regfile
;
wire
[
31
:
0
]
rs2_regfile
;
wire
write
=
(
w_rd_store_i
&&
(
w_rd_i
!=
0
))
;
// By adding rst_i, register 0 is written (to 0) during reset. This is
// required on some flash FPGA (like smartfusion2 or ProASIC3) which
// doesn't support initialized RAMs.
wire
write
=
rst_i
||
(
w_rd_store_i
&&
(
w_rd_i
!=
0
))
;
urv_regmem
bank0
(
.
clk_i
(
clk_i
)
,
.
rst_i
(
rst_i
)
,
.
en1_i
(
!
d_stall_i
)
,
.
a1_i
(
rf_rs1_i
)
,
.
q1_o
(
rs1_regfile
)
,
...
...
@@ -110,7 +111,6 @@ module urv_regfile
urv_regmem
bank1
(
.
clk_i
(
clk_i
)
,
.
rst_i
(
rst_i
)
,
.
en1_i
(
!
d_stall_i
)
,
.
a1_i
(
rf_rs2_i
)
,
.
q1_o
(
rs2_regfile
)
,
...
...
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