Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eddr3
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
eddr3
Commits
d9b14b00
Commit
d9b14b00
authored
May 31, 2014
by
Andrey Filippov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added 16-bit shift register
parent
c72a52a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
dly01_16.v
util_modules/dly01_16.v
+55
-0
No files found.
util_modules/dly01_16.v
0 → 100644
View file @
d9b14b00
/*******************************************************************************
* Module: dly01_16
* Date:2014-05-30
* Author: Andrey Filippov
* Description: Synchronous delay by 1-16 clock cycles with reset (will map to primitive)
*
* Copyright (c) 2014 Elphel, Inc.
* dly01_16.v is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* dly01_16.v is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/> .
*******************************************************************************/
`timescale
1
ns
/
1
ps
module
dly01_16
(
input
clk
,
input
rst
,
input
[
3
:
0
]
dly
,
input
din
,
output
reg
dout
)
;
reg
[
15
:
0
]
sr
=
0
;
always
@
(
posedge
rst
or
posedge
clk
)
begin
if
(
rst
)
sr
<=
0
;
else
sr
<=
{
sr
[
14
:
0
]
,
din
};
end
always
@
(
sr
or
dly
)
case
(
dly
)
4'h0
:
dout
<=
sr
[
0
]
;
4'h1
:
dout
<=
sr
[
1
]
;
4'h2
:
dout
<=
sr
[
2
]
;
4'h3
:
dout
<=
sr
[
3
]
;
4'h4
:
dout
<=
sr
[
4
]
;
4'h5
:
dout
<=
sr
[
5
]
;
4'h6
:
dout
<=
sr
[
6
]
;
4'h7
:
dout
<=
sr
[
7
]
;
4'h8
:
dout
<=
sr
[
8
]
;
4'h9
:
dout
<=
sr
[
9
]
;
4'ha
:
dout
<=
sr
[
10
]
;
4'hb
:
dout
<=
sr
[
11
]
;
4'hc
:
dout
<=
sr
[
12
]
;
4'hd
:
dout
<=
sr
[
13
]
;
4'he
:
dout
<=
sr
[
14
]
;
4'hf
:
dout
<=
sr
[
15
]
;
endcase
endmodule
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