Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
12
Issues
12
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Switch - Gateware
Commits
5cf8744e
Commit
5cf8744e
authored
Jul 17, 2012
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrsw_swcore/mpm/mpm_pipelined_mux: simulation fix
parent
04745eee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
mpm_pipelined_mux.vhd
modules/wrsw_swcore/mpm/mpm_pipelined_mux.vhd
+18
-4
No files found.
modules/wrsw_swcore/mpm/mpm_pipelined_mux.vhd
View file @
5cf8744e
...
...
@@ -78,14 +78,28 @@ architecture rtl of mpm_pipelined_mux is
signal
d_extended
:
std_logic_vector
(
c_num_inputs_floor3
*
g_width
-
1
downto
0
);
signal
sel_extended
:
std_logic_vector
(
c_num_inputs_floor3
-
1
downto
0
)
:
=
(
others
=>
'0'
);
function
f_deXize
(
x
:
std_logic_vector
)
return
std_logic_vector
is
variable
tmp
:
std_logic_vector
(
x
'length
-1
downto
0
);
begin
for
i
in
0
to
x
'length
-1
loop
if
(
x
(
i
)
=
'0'
or
x
(
i
)
=
'1'
)
then
tmp
(
i
)
:
=
x
(
i
);
else
tmp
(
i
)
:
=
'0'
;
end
if
;
end
loop
;
-- i
return
tmp
;
end
f_deXize
;
begin
-- rtl
d_extended
(
d_i
'left
downto
0
)
<=
d_i
;
d_extended
(
d_i
'left
downto
0
)
<=
d_i
;
sel_extended
(
sel_i
'left
downto
0
)
<=
sel_i
;
-- 1st stage, optimized for 5-input LUTs: mux each 3-input groups or 0
-- if (sel == 11)
gen_1st_stage
:
for
i
in
0
to
c_first_stage_muxes
-1
generate
...
...
@@ -124,7 +138,7 @@ begin -- rtl
row
(
i
)
:
=
first_stage
(
i
,
j
);
end
loop
;
-- i
if
(
unsigned
(
row
)
=
0
)
then
if
(
unsigned
(
f_deXize
(
row
)
)
=
0
)
then
q_o
(
j
)
<=
'0'
;
else
q_o
(
j
)
<=
'1'
;
...
...
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