Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
Conv TTL Blocking
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
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
Conv TTL Blocking
Commits
5b72c846
Commit
5b72c846
authored
Aug 22, 2012
by
gilsoriano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated ctdah_lib.
parent
1f9155f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
0 deletions
+74
-0
FIFO_simple.vhd
hdl/ctdah_lib/rtl/FIFO_simple.vhd
+60
-0
ctdah_pkg.vhd
hdl/ctdah_lib/rtl/ctdah_pkg.vhd
+14
-0
No files found.
hdl/ctdah_lib/rtl/FIFO_simple.vhd
0 → 100755
View file @
5b72c846
----------------------------------------------------------------------------------
-- Company: CERN, BE-CO-HT
-- Engineer: Carlos Gil Soriano
--
-- Create Date: 10:33:33 31/06/2012
-- Design Name: FIFO, fixed depth to one
-- Module Name: FIFO_simple - Behavioral
-- Project Name: CTDAH
-- Target Devices: Spartan 6
-- Tool versions:
-- Description: This module implements a generic FIFO of lenght one.
--
-- input--->
-- | REG 0 | ---> reg_o LSB
-- |__________|
--
-- Dependencies:
--
-- Revision:
-- Revision 0.01 - File Created
-- Additional Comments:
--
----------------------------------------------------------------------------------
library
IEEE
;
use
IEEE
.
STD_LOGIC_1164
.
ALL
;
use
IEEE
.
NUMERIC_STD
.
ALL
;
entity
FIFO_simple
is
generic
(
g_data_width
:
NATURAL
:
=
8
);
port
(
reg_i
:
in
STD_LOGIC_VECTOR
(
g_data_width
-
1
downto
0
);
clk
:
in
STD_LOGIC
;
push
:
in
STD_LOGIC
;
flush
:
in
STD_LOGIC
;
reg_o
:
out
STD_LOGIC_VECTOR
(
g_data_width
-
1
downto
0
)
);
end
FIFO_simple
;
architecture
Behavioral
of
FIFO_simple
is
begin
reg_proc
:
process
(
clk
)
begin
if
rising_edge
(
clk
)
then
if
flush
=
'1'
then
reg_o
<=
(
others
=>
'0'
);
elsif
push
=
'1'
then
reg_o
<=
reg_i
;
else
end
if
;
end
if
;
end
process
;
end
Behavioral
;
hdl/ctdah_lib/rtl/ctdah_pkg.vhd
View file @
5b72c846
...
...
@@ -73,6 +73,20 @@ package ctdah_pkg is
);
end
component
;
component
FIFO_simple
is
generic
(
g_data_width
:
NATURAL
:
=
8
);
port
(
reg_i
:
in
STD_LOGIC_VECTOR
(
g_data_width
-1
downto
0
);
clk
:
in
STD_LOGIC
;
push
:
in
STD_LOGIC
;
flush
:
in
STD_LOGIC
;
reg_o
:
out
STD_LOGIC_VECTOR
(
g_data_width
-
1
downto
0
)
);
end
component
;
end
ctdah_pkg
;
package
body
ctdah_pkg
is
...
...
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