Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HDL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
RTSD
HDL
Commits
996114aa
Commit
996114aa
authored
10 years ago
by
Pepping
Browse files
Options
Downloads
Patches
Plain Diff
- Added fifo used words to the register for both rd and wr fifo
- Switched fail and ok in reg map - Removed comments
parent
2de7f409
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/io/ddr/src/vhdl/io_ddr.vhd
+28
-20
28 additions, 20 deletions
libraries/io/ddr/src/vhdl/io_ddr.vhd
with
28 additions
and
20 deletions
libraries/io/ddr/src/vhdl/io_ddr.vhd
+
28
−
20
View file @
996114aa
...
@@ -238,7 +238,11 @@ ARCHITECTURE str OF io_ddr IS
...
@@ -238,7 +238,11 @@ ARCHITECTURE str OF io_ddr IS
CONSTANT
c_wr_fifo_depth
:
NATURAL
:
=
g_wr_fifo_depth
*
(
c_ctlr_data_w
/
g_wr_data_w
);
-- get FIFO depth at write side
CONSTANT
c_wr_fifo_depth
:
NATURAL
:
=
g_wr_fifo_depth
*
(
c_ctlr_data_w
/
g_wr_data_w
);
-- get FIFO depth at write side
CONSTANT
c_wr_fifo_af_margin
:
NATURAL
:
=
4
+
1
;
-- use +1 to compensate for latency introduced by registering wr_siso.ready due to RL=0
CONSTANT
c_wr_fifo_af_margin
:
NATURAL
:
=
4
+
1
;
-- use +1 to compensate for latency introduced by registering wr_siso.ready due to RL=0
CONSTANT
c_mem_reg_io_ddr
:
t_c_mem
:
=
(
c_mem_reg_rd_latency
,
1
,
32
,
1
,
'X'
);
CONSTANT
c_mem_reg_adr_w
:
NATURAL
:
=
2
;
CONSTANT
c_mem_reg_dat_w
:
NATURAL
:
=
32
;
CONSTANT
c_mem_reg_nof_data
:
NATURAL
:
=
3
;
CONSTANT
c_mem_reg_io_ddr
:
t_c_mem
:
=
(
c_mem_reg_rd_latency
,
c_mem_reg_adr_w
,
c_mem_reg_dat_w
,
c_mem_reg_nof_data
,
'X'
);
SIGNAL
ctlr_dvr_miso
:
t_mem_ctlr_miso
;
SIGNAL
ctlr_dvr_miso
:
t_mem_ctlr_miso
;
SIGNAL
ctlr_dvr_mosi
:
t_mem_ctlr_mosi
;
SIGNAL
ctlr_dvr_mosi
:
t_mem_ctlr_mosi
;
...
@@ -268,7 +272,7 @@ ARCHITECTURE str OF io_ddr IS
...
@@ -268,7 +272,7 @@ ARCHITECTURE str OF io_ddr IS
SIGNAL
dp_flush_snk_in
:
t_dp_sosi
:
=
c_dp_sosi_rst
;
SIGNAL
dp_flush_snk_in
:
t_dp_sosi
:
=
c_dp_sosi_rst
;
SIGNAL
ctlr_rst_out_i
:
STD_LOGIC
;
SIGNAL
ctlr_rst_out_i
:
STD_LOGIC
;
SIGNAL
mm_reg_io_ddr
:
STD_LOGIC_VECTOR
(
3
1
DOWNTO
0
);
SIGNAL
mm_reg_io_ddr
:
STD_LOGIC_VECTOR
(
c_mem_reg_nof_data
*
c_mem_reg_dat_w
-
1
DOWNTO
0
);
BEGIN
BEGIN
...
@@ -468,34 +472,38 @@ BEGIN
...
@@ -468,34 +472,38 @@ BEGIN
phy4_ou
=>
phy4_ou
phy4_ou
=>
phy4_ou
);
);
ctlr_rst_out
<=
ctlr_rst_out_i
;
ctlr_rst_out
<=
ctlr_rst_out_i
;
mm_reg_io_ddr
<=
RESIZE_UVEC
(
ctlr_tech_miso
.
cal_ok
&
ctlr_tech_miso
.
cal_fail
&
ctlr_rst_out_i
&
ctlr_tech_mosi
.
flush
&
ctlr_tech_miso
.
waitrequest_n
&
ctlr_tech_miso
.
done
,
32
);
mm_reg_io_ddr
<=
RESIZE_UVEC
(
ctlr_wr_fifo_usedw
,
c_mem_reg_dat_w
)
&
RESIZE_UVEC
(
ctlr_rd_fifo_usedw
,
c_mem_reg_dat_w
)
&
RESIZE_UVEC
(
ctlr_tech_miso
.
cal_fail
&
ctlr_tech_miso
.
cal_ok
&
ctlr_rst_out_i
&
ctlr_wr_flush_en
&
ctlr_tech_miso
.
waitrequest_n
&
ctlr_tech_miso
.
done
,
c_mem_reg_dat_w
);
u_reg_map
:
ENTITY
common_lib
.
common_reg_r_w_dc
u_reg_map
:
ENTITY
common_lib
.
common_reg_r_w_dc
GENERIC
MAP
(
GENERIC
MAP
(
g_cross_clock_domain
=>
TRUE
,
-- : BOOLEAN := TRUE; -- use FALSE when mm_clk and st_clk are the same, else use TRUE to cross the clock domain
g_cross_clock_domain
=>
TRUE
,
g_in_new_latency
=>
0
,
-- : NATURAL := 0; -- >= 0
g_in_new_latency
=>
0
,
g_readback
=>
FALSE
,
-- : BOOLEAN := FALSE; -- must use FALSE for write/read or read only register when g_cross_clock_domain=TRUE
g_readback
=>
FALSE
,
g_reg
=>
c_mem_reg_io_ddr
,
-- : t_c_mem := c_mem_reg;
g_reg
=>
c_mem_reg_io_ddr
,
g_init_reg
=>
(
OTHERS
=>
'0'
)
-- : STD_LOGIC_VECTOR(c_mem_reg_init_w-1 DOWNTO 0) := (OTHERS => '0')
g_init_reg
=>
(
OTHERS
=>
'0'
)
)
)
PORT
MAP
(
PORT
MAP
(
-- Clocks and reset
-- Clocks and reset
mm_rst
=>
mm_rst
,
--: IN STD_LOGIC; -- reset synchronous with mm_clk
mm_rst
=>
mm_rst
,
mm_clk
=>
mm_clk
,
--: IN STD_LOGIC; -- memory-mapped bus clock
mm_clk
=>
mm_clk
,
st_rst
=>
ctlr_rst_in
,
--: IN STD_LOGIC; -- reset synchronous with st_clk
st_rst
=>
ctlr_rst_in
,
st_clk
=>
ctlr_clk_in
,
--: IN STD_LOGIC; -- other clock domain clock
st_clk
=>
ctlr_clk_in
,
-- Memory Mapped Slave in mm_clk domain
-- Memory Mapped Slave in mm_clk domain
sla_in
=>
reg_io_ddr_mosi
,
--: IN t_mem_mosi; -- actual ranges defined by g_reg
sla_in
=>
reg_io_ddr_mosi
,
sla_out
=>
reg_io_ddr_miso
,
--: OUT t_mem_miso; -- actual ranges defined by g_reg
sla_out
=>
reg_io_ddr_miso
,
-- MM registers in st_clk domain
-- MM registers in st_clk domain
reg_wr_arr
=>
OPEN
,
-- : OUT STD_LOGIC_VECTOR( g_reg.nof_dat-1 DOWNTO 0);
reg_wr_arr
=>
OPEN
,
reg_rd_arr
=>
OPEN
,
-- : OUT STD_LOGIC_VECTOR( g_reg.nof_dat-1 DOWNTO 0);
reg_rd_arr
=>
OPEN
,
in_new
=>
'1'
,
-- : IN STD_LOGIC := '1';
in_new
=>
'1'
,
in_reg
=>
mm_reg_io_ddr
,
-- : IN STD_LOGIC_VECTOR(g_reg.dat_w*g_reg.nof_dat-1 DOWNTO 0);
in_reg
=>
mm_reg_io_ddr
,
out_reg
=>
OPEN
-- : OUT STD_LOGIC_VECTOR(g_reg.dat_w*g_reg.nof_dat-1 DOWNTO 0)
out_reg
=>
OPEN
);
);
END
str
;
END
str
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment