Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
FPGA Library Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
FPGA Library Tech
Compare revisions
c51fa197a1d89ed556653fd7743c4aba20383b39 to 3e6eea8f70104378841ddb7032399cebcf43686f
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
soclabs/fpga_lib_tech
Select target project
No results found
3e6eea8f70104378841ddb7032399cebcf43686f
Select Git revision
Swap
Target
soclabs/fpga_lib_tech
Select target project
soclabs/fpga_lib_tech
1 result
c51fa197a1d89ed556653fd7743c4aba20383b39
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Created SRAM wrapper to allow SRAM to be substitute with Technology dependent version
· 9b66219c
dam1n19
authored
1 year ago
9b66219c
Changed Path for SRAM file wrapper
· 3e6eea8f
dam1n19
authored
1 year ago
3e6eea8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sram/verilog/sl_ahb_sram.v
+89
-0
89 additions, 0 deletions
sram/verilog/sl_ahb_sram.v
with
89 additions
and
0 deletions
sram/verilog/sl_ahb_sram.v
0 → 100644
View file @
3e6eea8f
//-----------------------------------------------------------------------------
// SoCLabs FPGA SRAM Wrapper
// - to be substitued with same name file in filelist when moving to ASIC
// A joint work commissioned on behalf of SoC Labs, under Arm Academic Access license.
//
// Contributors
//
// David Mapstone (d.a.mapstone@soton.ac.uk)
//
// Copyright 2021-3, SoC Labs (www.soclabs.org)
//-----------------------------------------------------------------------------
module
sl_ahb_sram
#(
// System Parameters
parameter
SYS_ADDR_W
=
32
,
// System Address Width
parameter
SYS_DATA_W
=
32
,
// System Data Width
parameter
RAM_ADDR_W
=
14
,
// Size of SRAM
parameter
RAM_DATA_W
=
32
,
// Data Width of RAM
parameter
FILENAME
=
"image.hex"
// Initial Image to Populate Memory with
)(
// --------------------------------------------------------------------------
// Port Definitions
// --------------------------------------------------------------------------
input
wire
HCLK
,
// system bus clock
input
wire
HRESETn
,
// system bus reset
input
wire
HSEL
,
// AHB peripheral select
input
wire
HREADY
,
// AHB ready input
input
wire
[
1
:
0
]
HTRANS
,
// AHB transfer type
input
wire
[
2
:
0
]
HSIZE
,
// AHB hsize
input
wire
HWRITE
,
// AHB hwrite
input
wire
[
RAM_ADDR_W
-
1
:
0
]
HADDR
,
// AHB address bus
input
wire
[
31
:
0
]
HWDATA
,
// AHB write data bus
output
wire
HREADYOUT
,
// AHB ready output to S->M mux
output
wire
HRESP
,
// AHB response
output
wire
[
SYS_DATA_W
-
1
:
0
]
HRDATA
// AHB read data bus
);
// Internal Wiring
wire
[
RAM_ADDR_W
-
3
:
0
]
addr
;
wire
[
RAM_DATA_W
-
1
:
0
]
wdata
;
wire
[
RAM_DATA_W
-
1
:
0
]
rdata
;
wire
[
3
:
0
]
wen
;
wire
cs
;
// AHB to SRAM Conversion
cmsdk_ahb_to_sram
#(
.
AW
(
RAM_ADDR_W
)
)
u_ahb_to_sram
(
// AHB Inputs
.
HCLK
(
HCLK
),
.
HRESETn
(
HRESETn
),
.
HSEL
(
HSEL
),
.
HADDR
(
HADDR
[
RAM_ADDR_W
-
1
:
0
]),
.
HTRANS
(
HTRANS
),
.
HSIZE
(
HSIZE
),
.
HWRITE
(
HWRITE
),
.
HWDATA
(
HWDATA
),
.
HREADY
(
HREADY
),
// AHB Outputs
.
HREADYOUT
(
HREADYOUT
),
.
HRDATA
(
HRDATA
),
.
HRESP
(
HRESP
),
// SRAM input
.
SRAMRDATA
(
rdata
),
// SRAM Outputs
.
SRAMADDR
(
addr
),
.
SRAMWDATA
(
wdata
),
.
SRAMWEN
(
wen
),
.
SRAMCS
(
cs
)
);
// FPGA SRAM model
cmsdk_fpga_sram
#(
.
AW
(
RAM_ADDR_W
)
)
u_sram
(
// SRAM Inputs
.
CLK
(
HCLK
),
.
ADDR
(
addr
),
.
WDATA
(
wdata
),
.
WREN
(
wen
),
.
CS
(
cs
),
// SRAM Output
.
RDATA
(
rdata
)
);
endmodule
\ No newline at end of file
This diff is collapsed.
Click to expand it.