Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Network Interface Card
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
White Rabbit Network Interface Card
Commits
acdfe07a
Commit
acdfe07a
authored
Jul 25, 2013
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dio: improve readability using with/select syntax
parent
a6ea7146
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
wrsw_dio.vhd
modules/wrsw_dio/wrsw_dio.vhd
+1
-1
xwrsw_dio.vhd
modules/wrsw_dio/xwrsw_dio.vhd
+6
-3
No files found.
modules/wrsw_dio/wrsw_dio.vhd
View file @
acdfe07a
...
...
@@ -142,7 +142,7 @@ U_WRAPPER_DIO : xwrsw_dio
rst_n_i
=>
rst_n_i
,
dio_clk_i
=>
dio_clk_i
,
dio_pps_i
=>
dio_
clk
_i
,
dio_pps_i
=>
dio_
pps
_i
,
dio_in_i
=>
dio_in_i
,
dio_out_o
=>
dio_out_o
,
dio_oe_n_o
=>
dio_oe_n_o
,
...
...
modules/wrsw_dio/xwrsw_dio.vhd
View file @
acdfe07a
...
...
@@ -615,11 +615,14 @@ begin
gen_pio_assignment
:
for
i
in
0
to
4
generate
gpio_in
(
c_IOMODE_NB
*
i
)
<=
dio_in_i
(
i
);
dio_pulse
(
i
)
<=
'1'
when
dio_pulse_immed
(
i
)
=
'1'
else
dio_pulse_prog
(
i
);
dio_out_o
(
i
)
<=
dio_pps_i
when
(
dio_iomode_reg
(
c_IOMODE_NB
*
i
+
1
downto
c_IOMODE_NB
*
i
)
=
"10"
)
else
dio_pulse
(
i
)
when
(
dio_iomode_reg
(
c_IOMODE_NB
*
i
+
1
downto
c_IOMODE_NB
*
i
)
=
"01"
)
else
gpio_out
(
c_IOMODE_NB
*
i
);
dio_oe_n_o
(
i
)
<=
dio_iomode_reg
(
c_IOMODE_NB
*
i
+
2
);
dio_term_en_o
(
i
)
<=
dio_iomode_reg
(
c_IOMODE_NB
*
i
+
3
);
with
dio_iomode_reg
(
c_IOMODE_NB
*
i
+
1
downto
c_IOMODE_NB
*
i
)
select
dio_out_o
(
i
)
<=
gpio_out
(
c_IOMODE_NB
*
i
)
when
"00"
,
--GPIO out as also 4 bits per channel
dio_pulse
(
i
)
when
"01"
,
dio_pps_i
when
"10"
,
'1'
when
others
;
--Error output will stay at one (similar as GPIO set to one)
end
generate
gen_pio_assignment
;
dio_led_bot_o
<=
gpio_out
(
28
);
...
...
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