Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
TDC core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
TDC core
Commits
8ec0e0af
Commit
8ec0e0af
authored
Sep 08, 2011
by
Sebastien Bourdeauducq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo: initialize BRAM
parent
01c194ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
system.v
demo/boards/spec/rtl/system.v
+5
-1
bram.v
demo/cores/bram/rtl/bram.v
+18
-1
No files found.
demo/boards/spec/rtl/system.v
View file @
8ec0e0af
...
...
@@ -362,7 +362,11 @@ lm32_top cpu(
// BRAM/SRAM
//---------------------------------------------------------------------------
bram
#(
.
adr_width
(
14
)
.
adr_width
(
14
)
,
.
init0
(
"../../../software/bios/bios.h1"
)
,
.
init1
(
"../../../software/bios/bios.h2"
)
,
.
init2
(
"../../../software/bios/bios.h3"
)
,
.
init3
(
"../../../software/bios/bios.h4"
)
)
bram
(
.
sys_clk
(
sys_clk
)
,
.
sys_rst
(
sys_rst
)
,
...
...
demo/cores/bram/rtl/bram.v
View file @
8ec0e0af
/*
* Milkymist SoC
* Copyright (C) 2007, 2008, 2009 Sebastien Bourdeauducq
* Copyright (C) 2011 CERN
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -16,7 +17,11 @@
*/
module
bram
#(
parameter
adr_width
=
11
// in bytes
parameter
adr_width
=
11
,
// in bytes
parameter
init0
=
""
,
parameter
init1
=
""
,
parameter
init2
=
""
,
parameter
init3
=
""
)
(
input
sys_clk
,
input
sys_rst
,
...
...
@@ -45,6 +50,18 @@ reg [7:0] ram0 [0:word_depth-1];
reg
[
7
:
0
]
ram1
[
0
:
word_depth
-
1
]
;
reg
[
7
:
0
]
ram2
[
0
:
word_depth
-
1
]
;
reg
[
7
:
0
]
ram3
[
0
:
word_depth
-
1
]
;
initial
begin
if
(
init0
!=
""
)
$
readmemh
(
init0
,
ram0
)
;
if
(
init1
!=
""
)
$
readmemh
(
init1
,
ram1
)
;
if
(
init2
!=
""
)
$
readmemh
(
init2
,
ram2
)
;
if
(
init3
!=
""
)
$
readmemh
(
init3
,
ram3
)
;
end
wire
[
word_width
-
1
:
0
]
adr
;
wire
[
7
:
0
]
ram0di
;
...
...
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