Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
P
Platform-independent core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
18
Issues
18
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
Platform-independent core collection
Commits
81f2155b
Commit
81f2155b
authored
Aug 22, 2013
by
Wesley W. Terpstra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
altera: add missing gc_shiftreg
The recent merge lost our Altera work-alike.
parent
6fba1ad7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
1 deletion
+40
-1
Manifest.py
modules/genrams/altera/Manifest.py
+2
-1
gc_shiftreg.vhd
modules/genrams/altera/gc_shiftreg.vhd
+38
-0
No files found.
modules/genrams/altera/Manifest.py
View file @
81f2155b
...
...
@@ -3,4 +3,5 @@ files = [
"generic_simple_dpram.vhd"
,
"generic_dpram.vhd"
,
"generic_spram.vhd"
,
"generic_sync_fifo.vhd"
]
"generic_sync_fifo.vhd"
,
"gc_shiftreg.vhd"
]
modules/genrams/altera/gc_shiftreg.vhd
0 → 100644
View file @
81f2155b
library
ieee
;
use
ieee
.
STD_LOGIC_1164
.
all
;
use
ieee
.
NUMERIC_STD
.
all
;
use
work
.
genram_pkg
.
all
;
entity
gc_shiftreg
is
generic
(
g_size
:
integer
);
port
(
clk_i
:
in
std_logic
;
en_i
:
in
std_logic
;
d_i
:
in
std_logic
;
q_o
:
out
std_logic
;
a_i
:
in
std_logic_vector
(
f_log2_size
(
g_size
)
-1
downto
0
));
end
gc_shiftreg
;
architecture
rtl
of
gc_shiftreg
is
signal
a
:
std_logic_vector
(
4
downto
0
);
signal
sr
:
std_logic_vector
(
g_size
-1
downto
0
);
begin
a
<=
std_logic_vector
(
resize
(
unsigned
(
a_i
),
5
));
p_srl
:
process
(
clk_i
)
begin
if
rising_edge
(
clk_i
)
then
if
en_i
=
'1'
then
sr
<=
sr
(
sr
'left
-
1
downto
0
)
&
d_i
;
end
if
;
end
if
;
end
process
;
q_o
<=
sr
(
TO_INTEGER
(
unsigned
(
a_i
)));
end
rtl
;
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