w11 - vhd
0.794
W11 CPU core and support modules
Toggle main menu visibility
Main Page
Packages
Package List
Design Units
Design Unit List
Design Unit Index
Design Unit Hierarchy
Design Unit Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions/Procedures/Processes
b
c
d
e
g
h
i
n
o
p
r
s
t
w
x
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
File Members
All
t
Variables
t
•
All
Classes
Namespaces
Files
Functions
Variables
Loading...
Searching...
No Matches
gray_cnt_gen.vhd
Go to the documentation of this file.
1
-- $Id: gray_cnt_gen.vhd 1181 2019-07-08 17:00:50Z mueller $
2
-- SPDX-License-Identifier: GPL-3.0-or-later
3
-- Copyright 2007- by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4
--
5
------------------------------------------------------------------------------
6
-- Module Name: gray_cnt_gen - syn
7
-- Description: Generic width Gray code counter
8
--
9
-- Dependencies: -
10
-- Test bench: -
11
-- Target Devices: generic
12
-- Tool versions: xst 8.1-14.7; viv 2014.4-2015.4; ghdl 0.18-0.33
13
-- Revision History:
14
-- Date Rev Version Comment
15
-- 2007-12-26 106 1.0 Initial version
16
------------------------------------------------------------------------------
17
18
library
ieee
;
19
use
ieee.std_logic_1164.
all
;
20
21
use
work.
slvtypes
.
all
;
22
use
work.
genlib
.
all
;
23
24
entity
gray_cnt_gen
is
-- gray code counter, generic vector
25
generic
(
26
DWIDTH
:
positive
:=
4
)
;
-- data width
27
port
(
28
CLK
:
in
slbit
;
-- clock
29
RESET
:
in
slbit
:=
'
0
'
;
-- reset
30
CE
:
in
slbit
:=
'
1
'
;
-- count enable
31
DATA
:
out
slv
(
DWIDTH
-
1
downto
0
)
-- data out
32
)
;
33
end
entity
gray_cnt_gen
;
34
35
36
architecture
syn
of
gray_cnt_gen
is
37
38
begin
39
40
assert
DWIDTH
>=
4
41
report
"assert(DWIDTH>=4): only 4 or more bit width supported"
42
severity
failure
;
43
44
45
GRAY_4
:
if
DWIDTH
=
4
generate
46
begin
47
CNT :
gray_cnt_4
48
port
map
(
49
CLK
=>
CLK
,
50
RESET
=>
RESET
,
51
CE
=>
CE
,
52
DATA
=>
DATA
53
)
;
54
end
generate
GRAY_4
;
55
56
GRAY_5
:
if
DWIDTH
=
5
generate
57
begin
58
CNT :
gray_cnt_5
59
port
map
(
60
CLK
=>
CLK
,
61
RESET
=>
RESET
,
62
CE
=>
CE
,
63
DATA
=>
DATA
64
)
;
65
end
generate
GRAY_5;
66
67
GRAY_N
:
if
DWIDTH
>
5
generate
68
begin
69
CNT :
gray_cnt_n
70
generic
map
(
71
DWIDTH
=>
DWIDTH
)
72
port
map
(
73
CLK
=>
CLK
,
74
RESET
=>
RESET
,
75
CE
=>
CE
,
76
DATA
=>
DATA
77
)
;
78
end
generate
GRAY_N;
79
80
end
syn;
81
genlib
Definition:
genlib.vhd:32
gray_cnt_4
Definition:
gray_cnt_4.vhd:29
gray_cnt_4.CE
in CE slbit := '1'
Definition:
gray_cnt_4.vhd:33
gray_cnt_4.DATA
out DATA slv4
Definition:
gray_cnt_4.vhd:35
gray_cnt_4.CLK
in CLK slbit
Definition:
gray_cnt_4.vhd:31
gray_cnt_4.RESET
in RESET slbit := '0'
Definition:
gray_cnt_4.vhd:32
gray_cnt_5
Definition:
gray_cnt_5.vhd:29
gray_cnt_5.CE
in CE slbit := '1'
Definition:
gray_cnt_5.vhd:33
gray_cnt_5.DATA
out DATA slv5
Definition:
gray_cnt_5.vhd:35
gray_cnt_5.CLK
in CLK slbit
Definition:
gray_cnt_5.vhd:31
gray_cnt_5.RESET
in RESET slbit := '0'
Definition:
gray_cnt_5.vhd:32
gray_cnt_gen.syn
Definition:
gray_cnt_gen.vhd:36
gray_cnt_gen
Definition:
gray_cnt_gen.vhd:24
gray_cnt_gen.CE
in CE slbit := '1'
Definition:
gray_cnt_gen.vhd:30
gray_cnt_gen.DWIDTH
DWIDTH positive := 4
Definition:
gray_cnt_gen.vhd:26
gray_cnt_gen.CLK
in CLK slbit
Definition:
gray_cnt_gen.vhd:28
gray_cnt_gen.DATA
out DATA slv( DWIDTH- 1 downto 0)
Definition:
gray_cnt_gen.vhd:32
gray_cnt_gen.RESET
in RESET slbit := '0'
Definition:
gray_cnt_gen.vhd:29
gray_cnt_n
Definition:
gray_cnt_n.vhd:42
gray_cnt_n.DWIDTH
DWIDTH positive := 8
Definition:
gray_cnt_n.vhd:44
gray_cnt_n.CE
in CE slbit := '1'
Definition:
gray_cnt_n.vhd:48
gray_cnt_n.CLK
in CLK slbit
Definition:
gray_cnt_n.vhd:46
gray_cnt_n.DATA
out DATA slv( DWIDTH- 1 downto 0)
Definition:
gray_cnt_n.vhd:50
gray_cnt_n.RESET
in RESET slbit := '0'
Definition:
gray_cnt_n.vhd:47
slvtypes
Definition:
slvtypes.vhd:28
slvtypes.slbit
std_logic slbit
Definition:
slvtypes.vhd:30
slvtypes.slv
std_logic_vector slv
Definition:
slvtypes.vhd:31
vlib
genlib
gray_cnt_gen.vhd
Generated on Thu Feb 9 2023 12:41:05 for w11 - vhd by
1.9.6