Skip to content
GitLab
Explore
Sign in
Register
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
8abeacdc
Commit
8abeacdc
authored
1 year ago
by
Eric Kooistra
Browse files
Options
Downloads
Patches
Plain Diff
Do not define function input signal or constant.
parent
356615de
No related branches found
No related tags found
1 merge request
!339
Resolve L2SDP-959
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/base/reorder/src/vhdl/reorder_pkg.vhd
+12
-12
12 additions, 12 deletions
libraries/base/reorder/src/vhdl/reorder_pkg.vhd
with
12 additions
and
12 deletions
libraries/base/reorder/src/vhdl/reorder_pkg.vhd
+
12
−
12
View file @
8abeacdc
...
...
@@ -88,12 +88,12 @@ package reorder_pkg is
constant
c_reorder_transpose_rst
:
t_reorder_transpose
:
=
(
c_mem_copi_rst
,
0
,
0
,
0
);
-- Input block has
c_
nof_ch =
c_
nof_data_per_block *
c_
nof_blocks_per_packet
-- Input block has nof_ch = nof_data_per_block * nof_blocks_per_packet
-- data per packet. The transpose.select_copi.address order will yield
-- transposed output, with
c_
nof_blocks_per_packet and
c_
nof_data_per_block.
function
func_reorder_transpose
(
constant
c_
nof_blocks_per_packet
:
natural
;
constant
c_
nof_data_per_block
:
natural
;
signal
transpose
:
t_reorder_transpose
)
-- transposed output, with nof_blocks_per_packet and nof_data_per_block.
function
func_reorder_transpose
(
nof_blocks_per_packet
:
natural
;
nof_data_per_block
:
natural
;
transpose
:
t_reorder_transpose
)
return
t_reorder_transpose
;
end
reorder_pkg
;
...
...
@@ -136,9 +136,9 @@ package body reorder_pkg is
-- data_out: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 -- out_sosi
--
-- to restore the original order.
function
func_reorder_transpose
(
constant
c_
nof_blocks_per_packet
:
natural
;
constant
c_
nof_data_per_block
:
natural
;
signal
transpose
:
t_reorder_transpose
)
function
func_reorder_transpose
(
nof_blocks_per_packet
:
natural
;
nof_data_per_block
:
natural
;
transpose
:
t_reorder_transpose
)
return
t_reorder_transpose
is
variable
v
:
t_reorder_transpose
;
begin
...
...
@@ -147,14 +147,14 @@ package body reorder_pkg is
v
.
select_copi
.
address
:
=
TO_MEM_ADDRESS
(
v
.
addr
);
v
.
select_copi
.
rd
:
=
'1'
;
-- prepare next read address
if
v
.
blk_cnt
<=
c_
nof_blocks_per_packet
-
1
then
if
v
.
data_cnt
<
c_
nof_data_per_block
-
1
then
if
v
.
blk_cnt
<=
nof_blocks_per_packet
-
1
then
if
v
.
data_cnt
<
nof_data_per_block
-
1
then
v
.
data_cnt
:
=
v
.
data_cnt
+
1
;
v
.
addr
:
=
v
.
addr
+
c_
nof_blocks_per_packet
;
v
.
addr
:
=
v
.
addr
+
nof_blocks_per_packet
;
else
v
.
data_cnt
:
=
0
;
v
.
blk_cnt
:
=
v
.
blk_cnt
+
1
;
if
v
.
blk_cnt
=
c_
nof_blocks_per_packet
then
if
v
.
blk_cnt
=
nof_blocks_per_packet
then
v
.
blk_cnt
:
=
0
;
end
if
;
v
.
addr
:
=
v
.
blk_cnt
;
...
...
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